jantimon / html-webpack-plugin

Simplifies creation of HTML files to serve your webpack bundles
MIT License
10.71k stars 1.31k forks source link

html-webpack-plugin seemingly causes arrow functions to be escaped to `() =>` after yarn upgrade #1856

Closed Nantris closed 2 months ago

Nantris commented 2 months ago

Current behaviour 💣

Suddenly our builds cannot work due to our code being HTML-escaped

Expected behaviour ☀️

JavaScript is not treated as HTML in need of escaping

Reproduction Example 👾

Unknown. I've been trying to discover the precise cause of this for days but it's not easy when your yarn.lock has hundreds of changed lines. The yarn upgrade was only done after we'd already manually upgraded all of our direct dependencies, so it only upgraded sub-dependencies and it's been impossible to pinpoint which is the cause so far despite hours of trial and error.

Environment 🖥

Node.js v20.14.0
linux 6.8.0-41-generic
10.7.0
Nantris commented 2 months ago

Apparently minify is not false even when the mode is not production. minify is the issue.

Nantris commented 2 months ago

Specifically minifyCSS seems to have caused our problem.

alexander-akait commented 2 months ago

please open an issue in html-minifier-terser, we can't fix it here and we don't change it in laster releases, thank you