webpack-seed icon indicating copy to clipboard operation
webpack-seed copied to clipboard

build后不兼容ie8的解决方法

Open east119 opened this issue 7 years ago • 3 comments

@Array-Huang build后在ie8运行会报错

image

解决方法: plugins.product.config.js文件中 pluginsConfig.push(new webpack.optimize.UglifyJsPlugin({ compress: { screw_ie8: false,//默认true,不支持ie8 warnings: false, }, }));

east119 avatar Jan 19 '18 02:01 east119

6666666

EagleChinaWu avatar Jan 20 '18 02:01 EagleChinaWu

谢谢意见,不过我想问一下这screw_ie8参数你是在哪看到的?我查官方文档里怎么是ie8

Array-Huang avatar Jan 26 '18 15:01 Array-Huang

在这里看到的 http://www.css88.com/doc/webpack2/guides/production-build/ UglifyJsPlugin插件最新的配置为 pluginsConfig.push(new webpack.optimize.UglifyJsPlugin({ compress: { properties: false, screw_ie8: true }, output: { beautify: true, quote_keys: true }, mangle: { screw_ie8: false, keep_fnames: true }, comments: false }));

east119 avatar Mar 07 '18 09:03 east119