From d33f6ffb28719cef5c91e3a12247cb637fa00dd4 Mon Sep 17 00:00:00 2001 From: Yuxuan Zhang Date: Sun, 30 Mar 2025 00:43:41 -0400 Subject: [PATCH] fix: modify chunk rules to avoid circular import --- src/node/build/bundle.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node/build/bundle.ts b/src/node/build/bundle.ts index 662e9593..67669ad4 100644 --- a/src/node/build/bundle.ts +++ b/src/node/build/bundle.ts @@ -139,6 +139,12 @@ export async function bundle( ) { return 'framework' } + if (/(^|\/)config\.([cm]?js|ts|json)$/.test(id)) { + return 'framework' + } + if (id.endsWith('/vitepress/package.json')) { + return 'framework' + } if ( (id.startsWith(`${clientDir}/theme-default`) ||