diff --git a/vite.config.ts b/vite.config.ts index 0ee2f17..80cc16b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,6 +5,7 @@ import { resolve } from 'path'; import vue from '@vitejs/plugin-vue'; import svgSpritePlugin from "vite-plugin-svg-sprite-component"; import analyze from 'rollup-plugin-analyzer'; +import { splitVendorChunkPlugin } from 'vite' export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd()) @@ -21,7 +22,7 @@ export default defineConfig(({ mode }) => { ); return { - plugins: [vue(), analyze(), svgSpritePlugin({ + plugins: [splitVendorChunkPlugin(), vue(), analyze(), svgSpritePlugin({ symbolId: (name) => `icon--${name}`, removeAttrs: ['xmlns', 'width', 'height', 'version'] })],