Skip to content

Commit

Permalink
chore: 🤖 replace html-minifier with html-minifier-terser
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonEck committed Apr 30, 2024
1 parent 4a9fb83 commit e37c869
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 77 deletions.
210 changes: 137 additions & 73 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"eslint-plugin-storybook": "0.8.0",
"globals": "15.1.0",
"happy-dom": "14.7.1",
"html-minifier": "4.0.0",
"html-minifier-terser": "7.2.0",
"html-webpack-plugin": "5.6.0",
"prettier": "3.2.5",
"start-server-and-test": "2.0.3",
Expand Down
6 changes: 3 additions & 3 deletions scripts/esbuild-library-production-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import esbuild from 'esbuild';
import { rmSync, cpSync, readFileSync, writeFileSync } from 'fs';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
import { minify } from 'html-minifier';
import { minify } from 'html-minifier-terser';
import {
esbuildProductionLibraryConfig,
libraryDirectory,
Expand Down Expand Up @@ -67,11 +67,11 @@ const minifyHTMLConfig = {
sortAttributes: true,
sortClassName: true,
};
const eckAutocompleteComponentHTMLMinified = minify(
const eckAutocompleteComponentHTMLMinified = await minify(
eckAutocompleteComponentHTML,
minifyHTMLConfig,
);
const eckAutocompleteOptionComponentHTMLMinified = minify(
const eckAutocompleteOptionComponentHTMLMinified = await minify(
eckAutocompleteOptionComponentHTML,
minifyHTMLConfig,
);
Expand Down

1 comment on commit e37c869

@DanielRuf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest reading my comments and especially kangax/html-minifier#1135 (comment) - because switching to html-minifier-terser will not fix this.

Please sign in to comment.