File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class Builder extends BuilderCore {
8888 // 设置NODE_ENV 为 development
8989 devPlugins . push ( this . setDefinePlugin ( 'development' ) ) ;
9090 // 多实例构建
91- devPlugins . push ( this . setHappyPack ( options . jsLoader ) ) ;
91+ devPlugins . push ( this . setHappyPack ( options . jsLoader , options . useTreeShaking ) ) ;
9292 // 增加热更新组件
9393 devPlugins . push ( new webpack . HotModuleReplacementPlugin ( ) ) ;
9494 // 抽离公共js
@@ -191,7 +191,7 @@ class Builder extends BuilderCore {
191191 // 设置NODE_ENV 为 production
192192 prodPlugins . push ( this . setDefinePlugin ( 'production' ) ) ;
193193 // 多实例构建
194- prodPlugins . push ( this . setHappyPack ( options . jsLoader ) ) ;
194+ prodPlugins . push ( this . setHappyPack ( options . jsLoader , options . useTreeShaking ) ) ;
195195 // 抽离公共js
196196 //prodPlugins.push(this.setCommonsChunkPlugin());
197197 // 支持Fis3的 inline 语法糖 多页面打包, 默认压缩html
Original file line number Diff line number Diff line change 11{
22 "name" : " builder-webpack3" ,
3- "version" : " 0.4.3 " ,
3+ "version" : " 0.4.4 " ,
44 "description" : " webpack项目构建器." ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments