build: manual chunking

This commit is contained in:
uubulb
2024-11-25 01:31:34 +08:00
parent b474400649
commit 40b5aa7658

View File

@@ -23,4 +23,15 @@ export default defineConfig({
"@": path.resolve(__dirname, "./src"), "@": path.resolve(__dirname, "./src"),
}, },
}, },
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString();
}
}
}
}
}
}) })