feat: add flask dev mode and optimize SVG handling

- Optimize SVG loading using import.meta.glob and manual chunking
This commit is contained in:
2025-10-28 15:28:56 +08:00
parent ba569dafad
commit 303715f82c
6 changed files with 57 additions and 12 deletions

View File

@@ -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'],