From 52d669c5fab3f6471658c3fec80eabd425d8ef10 Mon Sep 17 00:00:00 2001 From: orionna319 Date: Fri, 24 Nov 2023 17:05:38 +0800 Subject: [PATCH] perf: split `activities.json` from index --- vite.config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index d6cd323b83a..11908d05f30 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,5 +11,14 @@ export default defineConfig({ build: { manifest: true, outDir: './dist', // for user easy to use, vercel use default dir -> dist + rollupOptions: { + output: { + manualChunks: (id: string) => { + if (id.includes('activities')) { + return 'activities' + } + }, + } + }, }, });