mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 10:00:08 +08:00
feat(electron.vite.config): add manual chunking for vendor modules in output configuration
This commit is contained in:
parent
b1babc8cb3
commit
08e7b6a7ba
@ -80,6 +80,16 @@ export default defineConfig({
|
|||||||
input: {
|
input: {
|
||||||
index: resolve(__dirname, 'src/renderer/index.html'),
|
index: resolve(__dirname, 'src/renderer/index.html'),
|
||||||
miniWindow: resolve(__dirname, 'src/renderer/miniWindow.html')
|
miniWindow: resolve(__dirname, 'src/renderer/miniWindow.html')
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
manualChunks(id: string) {
|
||||||
|
// All node_modules are in the vendor chunk
|
||||||
|
if (id.includes('node_modules')) {
|
||||||
|
return 'vendor'
|
||||||
|
}
|
||||||
|
// Other modules use default chunk splitting strategy
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user