perf: manual chunking

This commit is contained in:
hamster1963 2024-11-27 14:50:55 +08:00
parent 5e6158b120
commit ee9419cccc

View File

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