Skip to content

Commit cee2b84

Browse files
Minify inline <style> and <script> (v8#557)
1 parent cb10173 commit cee2b84

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.html-minifier.json

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"decodeEntities": true,
77
"html5": true,
88
"includeAutoGeneratedTags": false,
9+
"minifyCSS": true,
10+
"minifyJS": true,
911
"preserveLineBreaks": false,
1012
"preventAttributesEscaping": true,
1113
"removeAttributeQuotes": true,

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"scripts": {
44
"lint": "markdownlint \"src/**/*.md\"",
55
"eleventy": "eleventy",
6-
"html": "html-minifier --config-file=.html-minifier.json --input-dir=dist --output-dir=dist --file-ext=html",
6+
"html": "html-minifier-terser --config-file=.html-minifier.json --input-dir=dist --output-dir=dist --file-ext=html",
77
"css": "postcss src/_css/main.css --output dist/_css/main.css && postcss src/_css/feature-support.css --output dist/_css/feature-support.css",
88
"js": "shx mkdir -p dist/_js && terser src/_js/main.mjs -cm --module -o dist/_js/main.mjs && terser src/_js/legacy.js -cm -o dist/_js/legacy.js",
99
"json": "json-minify src/.webmanifest > dist/.webmanifest",
@@ -45,7 +45,7 @@
4545
"get-video-dimensions": "^1.0.0",
4646
"glob": "^7.1.6",
4747
"he": "^1.2.0",
48-
"html-minifier": "^4.0.0",
48+
"html-minifier-terser": "^5.1.1",
4949
"husky": "^4.2.5",
5050
"image-size": "^0.8.3",
5151
"json-minify": "^1.0.0",

0 commit comments

Comments
 (0)