calvinfung
calvinfung
Has there been any progress? So far I use source-map-explorer instead, but it's not accurate enough. Hoping to see a bugfix soon, because webpack-bundle-analyzer is very useful :)
处理思路与@bojueWjt 类似,首先需要用BundleAnalyzerPlugin分析vendor体积的组成。如果是node_modules体积过大,可以参考bojueWjt的帖子进行优化。(mpvue 初始化的项目已集成BundleAnalyzerPlugin, npm run build的时候加上 --report 参数即可开启 我们遇到的情况是分包的公共代码被意外打包到主包里的vendor.js里了,改成分包公共代码仅提取到分包内解决。 首先vendor.js代码来自CommonsChunkPlugin, mpvue默认的配置如下: ```js new webpack.optimize.CommonsChunkPlugin({ name: 'common/vendor', minChunks: function (module, count) { // any required modules inside node_modules are extracted to...
@HelloZJW 搭车同求。另外vendor.js大于500kB时,微信开发者工具的es6转es5功能也会不执行,导致兼容性问题。 目前只能暂时手动在webpack.base.conf.js里指定转译mpvue-page-factory来解决 