From 8f293e9cd5c19a5429ac4fe73f3f0a044ed3fcc5 Mon Sep 17 00:00:00 2001 From: dufu1991 Date: Fri, 13 Dec 2024 13:06:59 +0800 Subject: [PATCH] [deno]build chunk --- packages/stdf/vite.config.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/stdf/vite.config.ts b/packages/stdf/vite.config.ts index c344438..e1de50b 100644 --- a/packages/stdf/vite.config.ts +++ b/packages/stdf/vite.config.ts @@ -4,5 +4,17 @@ import svgSprite from 'rollup-plugin-stdf-icon'; export default defineConfig({ plugins: [sveltekit(), svgSprite([{ inFile: 'src/assets/svgs', outFile: 'static/fonts', fileName: 'symbol' }])], - server: { hmr: true, host: '0.0.0.0', port: 8888 } + server: { hmr: true, host: '0.0.0.0', port: 8888 }, + build: { + assetsDir: 'build', + rollupOptions: { + output: { + manualChunks: (id: string) => { + if (id.includes('node_modules')) { + return 'vendor/index'; + } + } + } + } + } });