[vue] 如何解决vue打包vendor过大的问题?
Activity
[-][vue] 如何解决vue打包wendor过大的问题?[/-][+][vue] 如何解决vue打包vendor过大的问题?[/+]persist-xyz commentedon Jul 3, 2019
1、在webpack.base.conf.js新增externals配置,表示不需要打包的文件,然后在index.html中通过CDN引入
2、使用路由懒加载 官网
Ankhyang commentedon Mar 9, 2021
开启gzip压缩
wanlixi commentedon Apr 8, 2022
CDN
tree-shaking
splitChunksPlugin
commonChunksPlugin
路由懒加载
1101334809 commentedon Aug 31, 2022
CDN引入会有些许问题,https模式下会有安全验证,使得cdn引入失败。