mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 12:00:44 +00:00
build: enhance Terser configuration for production minification
- Update Terser options to enable top-level mangling and increase compression passes from 2 to 3. - Improve minification by dropping unused top-level variables and functions.
This commit is contained in:
+3
-2
@@ -100,8 +100,9 @@ export default defineConfig(({ mode }) => {
|
||||
minify: isProduction ? "terser" : false,
|
||||
...(isProduction && {
|
||||
terserOptions: {
|
||||
compress: { passes: 2 },
|
||||
mangle: true,
|
||||
toplevel: true, // Mangle top-level names and drop unused top-level vars/functions
|
||||
compress: { passes: 3 },
|
||||
mangle: { toplevel: true }, // Shorten top-level function/variable names
|
||||
format: {
|
||||
comments: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user