亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Final generated jsBundle file compression problem
迷茫
迷茫 2017-07-05 10:54:19
0
2
850

If you write in the project webpack.config.js

file
        plugins: [bannerPlugin,
            new webpack.optimize.UglifyJsPlugin({
                compress: {
                    warnings: false
                }
            })
        ]

The size of the jsBundle file generated by such packaging is 50% smaller, but the problem is that the app cannot load such a jsBundle file. Is there any relevant solution?

迷茫
迷茫

業(yè)精于勤,荒于嬉;行成于思,毀于隨。

reply all(2)
大家講道理

The compressed jsBundle cannot be loaded because you need to add a banner that weex can recognize
If you use Vue for development, you need to keep { "framework": "Vue" }
// code compression plug-in
The code is as follows

var optimizePlugin = new webpack.optimize.UglifyJsPlugin({
  compress: {
    warnings: false
  },
  //保留banner
  comments: /{ "framework": "Vue" }/,
  sourceMap: true
})
伊謝爾倫

If you use Vue for development, you need to keep { "framework": "Vue" } from being compressed, just like what was said above.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template