请问nuxt.js项目打包后vendor.js过大怎么处理 ?

nuxt.js项目打包后vendor.js过大怎么处理 ?????


沧海一幻觉
浏览 6961回答 3
3回答

慕粉21210115

nuxt.config.js 在build中添加  build:{    optimization: {         splitChunks: {                    chunks: 'all',            automaticNameDelimiter: '.',            maxAsyncRequests: 7,                   cacheGroups: {                          vuetify: {                               test: /node_modules[\\/]vuetify/,                                chunks: 'all',                                priority: 20,                                name: true                           },                           elementui: {                                 test: /node_modules[\\/]element-ui/,                                chunks: 'all',                                priority: 20,                                 name: true                            }                    }               }    } }

乡兵1997

请问找到解决办法了吗?我最近也碰到这个问题
打开App,查看更多内容
随时随地看视频慕课网APP