mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-13 11:07:31 +08:00
fix(webui): split route bundles
This commit is contained in:
@@ -16,5 +16,20 @@ export default defineConfig(({mode}) => {
|
||||
server: {
|
||||
hmr: process.env.DISABLE_HMR !== 'true',
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return undefined;
|
||||
if (id.includes('react-router-dom') || id.includes('react-dom') || id.includes('/react/')) {
|
||||
return 'react-vendor';
|
||||
}
|
||||
if (id.includes('motion')) return 'motion';
|
||||
if (id.includes('lucide-react')) return 'icons';
|
||||
return undefined;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user