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
请问怎么去除 使用 // new webpack.optimize.UglifyJsPlugin({ // comments: false, //去掉注释 // compress: { // warnings: false //忽略警告,不然会有一大推的黄色字体出现 // } // }) 没作用
The text was updated successfully, but these errors were encountered:
会有一大推的黄色字体出现
不知道你说的黄色字体是什么
使用 babel-minify-webpack-plugin 会存在这个问题吗?
另外,一般像 Uglify 或 Babel Minify 之类的压缩工具,可以通过过滤 dead code 方式来实现删除代码
if (false) { console.log('blablabla'); }
这样的代码可以被压缩工具去掉。你可以通过 DefinePlugin 来把 __DEV__ 根据环境变量编译为 true 或 false
DefinePlugin
__DEV__
true
false
Sorry, something went wrong.
No branches or pull requests
请问怎么去除 使用
// new webpack.optimize.UglifyJsPlugin({
// comments: false, //去掉注释
// compress: {
// warnings: false //忽略警告,不然会有一大推的黄色字体出现
// }
// })
没作用
The text was updated successfully, but these errors were encountered: