From 5a9c5ec3f010d24df01cf50e037f5faca339ed5c Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:47:30 +0900 Subject: [PATCH] chore: fix build --- packages/vite/rollup.config.ts | 1 + packages/vite/src/node/config.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vite/rollup.config.ts b/packages/vite/rollup.config.ts index 59d569bfc8f4d0..6f253ce4aa6bf1 100644 --- a/packages/vite/rollup.config.ts +++ b/packages/vite/rollup.config.ts @@ -111,6 +111,7 @@ const nodeConfig = defineConfig({ /^vite\//, 'rollup/parseAst', /^tsx\//, + /^#/, ...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies), ], diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index 51555c3d36ad48..e066a92155c115 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -1697,7 +1697,8 @@ async function bundleConfigFile( fileName: string, isESM: boolean, ): Promise<{ code: string; dependencies: string[] }> { - const isModuleSyncConditionEnabled = await import('#module-sync-enabled') + const isModuleSyncConditionEnabled = (await import('#module-sync-enabled')) + .default const dirnameVarName = '__vite_injected_original_dirname' const filenameVarName = '__vite_injected_original_filename'