https://blog.csdn.net/qq_45284938/article/details/129707796
加上适应的配置项 根目录上vite.config.ts 文件
outDir: BUILD_DIR, // 指定打包文件的输出目录
emptyOutDir: true, // 打包时先清空上一次构建生成的目录
build: { outDir: BUILD_DIR, sourcemap: false, minify: 'terser', chunkSizeWarningLimit: 1500, emptyOutDir: true, terserOptions: { compress: { drop_console: true, drop_debugger: true } }, rollupOptions: { output: { manualChunks(id) { if (id.includes('node_modules')) { return id.toString().split('node_modules/')[1].split('/')[0].toString(); } }, chunkFileNames: (chunkInfo) => { const facadeModuleId = chunkInfo.facadeModuleId ? chunkInfo.facadeModuleId.split('/') : []; const fileName = facadeModuleId[facadeModuleId.length - 2] || '[name]'; return `js/${fileName}/[name].[hash].js`; } } } },
标签:kB,vue,chunkInfo,split,facadeModuleId,true,id,500 From: https://www.cnblogs.com/minch/p/17320840.html