reduce installer size 50% and app bundle size by 30%
This commit is contained in:
@@ -39,4 +39,25 @@ export default defineConfig({
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
target: 'esnext',
|
||||
minify: 'terser',
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ['console.log', 'console.debug']
|
||||
}
|
||||
},
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
'pixi': ['pixi.js'],
|
||||
'react-vendor': ['react', 'react-dom'],
|
||||
'video-processing': ['mediabunny', 'mp4box', '@fix-webm-duration/fix']
|
||||
}
|
||||
}
|
||||
},
|
||||
chunkSizeWarningLimit: 1000
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user