build: switch minifier from esbuild to oxc and remove enforce option from chunks

This commit is contained in:
Megghy
2025-10-03 09:55:59 +08:00
parent 995d41057d
commit 4e93b371f4

View File

@@ -101,7 +101,7 @@ export default defineConfig({
build: { build: {
sourcemap: true, sourcemap: true,
target: 'esnext', target: 'esnext',
minify: 'esbuild', minify: 'oxc',
chunkSizeWarningLimit: 1000, chunkSizeWarningLimit: 1000,
rollupOptions: { rollupOptions: {
output: { // @ts-ignore output: { // @ts-ignore
@@ -111,13 +111,11 @@ export default defineConfig({
name: 'vue-vendor', name: 'vue-vendor',
test: /[\\/]node_modules[\\/](vue|vue-router|pinia)[\\/]/, test: /[\\/]node_modules[\\/](vue|vue-router|pinia)[\\/]/,
priority: -10, priority: -10,
enforce: true,
}, },
{ {
name: 'ui-vendor', name: 'ui-vendor',
test: /[\\/]node_modules[\\/](naive-ui|@vueuse[\\/]core)[\\/]/, test: /[\\/]node_modules[\\/](naive-ui|@vueuse[\\/]core)[\\/]/,
priority: -10, priority: -10,
enforce: true,
}, },
], ],
}, },