We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tester webpack plugin
uglifyjs-webpack-plugin
至于为什么切换到tester webpack plugin,可以看看维护人员的说法:
Terser vs. UglifyJS - Dramatic Improvements。
并且作者也提出推荐使用tester webpack plugin, 并且在webpack5中会默认使用这个。
webpack5
下面是我在项目中的用法:
const TerserPlugin = require('terser-webpack-plugin'); //... new TerserPlugin({ terserOptions: { parse: { ecma: 8, }, compress: { ecma: 5, warnings: false, comparisons: false, inline: 2, }, mangle: { safari10: true, }, output: { ecma: 5, comments: false, ascii_only: true, }, }, parallel: true, // Enable file caching cache: true, sourceMap: false, })
The text was updated successfully, but these errors were encountered:
请教一下楼主,我使用这个插件的时候,会生成一个 2.2.4023f4be.js 的文件,在html中,并没有加载这个 js 导致显示不出页面,你有遇到这个问题吗,我的配置和你的差不多,只是少了一个 compress.ecma
Sorry, something went wrong.
@amazecc 没有碰到过耶,你这个js也有可能是懒加载的js。报错是关于这个js文件404吗? 不知道你的报错是啥。
No branches or pull requests
tester webpack plugin
uglifyjs-webpack-plugin
至于为什么切换到
tester webpack plugin
,可以看看维护人员的说法:Terser vs. UglifyJS - Dramatic Improvements。
并且作者也提出推荐使用
tester webpack plugin
, 并且在webpack5
中会默认使用这个。下面是我在项目中的用法:
The text was updated successfully, but these errors were encountered: