feat: add flask dev mode and optimize SVG handling
- Optimize SVG loading using import.meta.glob and manual chunking
This commit is contained in:
@@ -11,9 +11,21 @@ export default defineConfig({
|
||||
svgrOptions: {
|
||||
icon: true,
|
||||
prettier: true,
|
||||
}
|
||||
})
|
||||
},
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
// 将所有 SVG 文件打包到一个单独的 chunk 中
|
||||
if (id.includes('.svg') && id.includes('?react')) {
|
||||
return 'svg-icons';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
allowedHosts: ['154.9.253.114', 'localhost', 'teres.deep-pilot.chat'],
|
||||
|
||||
Reference in New Issue
Block a user