You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -297,7 +309,13 @@ By default, plugin uses [html-minifier-terser](https://github.com/terser/html-mi
297
309
We currently support:
298
310
299
311
-`HtmlMinimizerPlugin.htmlMinifierTerser`
300
-
-`HtmlMinimizerPlugin.swcMinify`
312
+
-`HtmlMinimizerPlugin.swcMinify` (used to compress HTML documents, i.e. with HTML doctype and `<html>`/`<body>`/`<head>` tags)
313
+
-`HtmlMinimizerPlugin.swcMinifyFragment` (used to compress HTML fragments, i.e. when you have part of HTML which will be inserted into another HTML parts)
314
+
315
+
> **Note**
316
+
>
317
+
> The difference between `swcMinify` and `swcMinifyFragment` is the error reporting.
318
+
> You will get errors (invalid or broken syntax) if you have them in your HTML document or fragment. Which allows you to see all the errors and problems at the build stage.
301
319
302
320
Useful for using and testing unpublished versions or forks.
303
321
@@ -454,6 +472,8 @@ module.exports = {
454
472
455
473
Available [`options`](https://github.com/swc-project/bindings/blob/main/packages/html/index.ts#L5).
0 commit comments