webpack4 vendor过大解决方案
webpack.config中optimization配置多个cacheGroups,对库进行分类打包
- 需要注意window和mac正则分割符,已踩坑
optimization配置代码
1 | optimization: { |
完整webpack.base.conf.js
1 | const path = require('path') |
webpack.config中optimization配置多个cacheGroups,对库进行分类打包
1 | optimization: { |
1 | const path = require('path') |