赞
踩
build: { // 静态资源合并打包 rollupOptions: { output: { chunkFileNames: 'static/js/[name]-[hash].js', entryFileNames: 'static/js/[name]-[hash].js', assetFileNames: 'static/[ext]/[name]-[hash].[ext]', // 超大静态资源拆分 manualChunks(id) { if (id.includes('node_modules')) { return id .toString() .split('node_modules/')[1] .split('/')[0] .toString(); } }, }, }, // 提高超大静态资源警告门槛 chunkSizeWarningLimit: 1000, },
未拆分:
拆分后:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。