Skip to content

Commit d068a4c

Browse files
committed
build: improve chunk stability across builds
1 parent f82637e commit d068a4c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.vitepress/config.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export default defineConfigWithTheme<Config>({
641641
}
642642
},
643643
build: {
644-
minify: 'terser',
644+
minify: false, //'terser',
645645
chunkSizeWarningLimit: Infinity,
646646
rollupOptions: {
647647
output: {
@@ -653,7 +653,17 @@ export default defineConfigWithTheme<Config>({
653653
if (id.includes('dynamics.js')) {
654654
return 'dynamics'
655655
}
656-
return moveToVendor(id, ctx)
656+
if (id.includes('plugin-vue:export-helper')) {
657+
return 'framework'
658+
}
659+
const isVendor = moveToVendor(id, ctx)
660+
if (isVendor) {
661+
if (/@vue\/(runtime|shared|reactivity)/.test(id)) {
662+
return 'framework'
663+
} else {
664+
return 'app'
665+
}
666+
}
657667
}
658668
}
659669
}

0 commit comments

Comments
 (0)