From dfe77ca2fbf9d03b303c75931ad38d2ec581b1e1 Mon Sep 17 00:00:00 2001 From: jack zhang <1098626505@qq.com> Date: Wed, 20 Sep 2023 11:46:06 +0800 Subject: [PATCH] fix: build bug (#2683) --- packages/core/build/src/buildPlugin.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/core/build/src/buildPlugin.ts b/packages/core/build/src/buildPlugin.ts index 8e83313a3..1e10ed415 100644 --- a/packages/core/build/src/buildPlugin.ts +++ b/packages/core/build/src/buildPlugin.ts @@ -21,11 +21,9 @@ import { getDepPkgPath, getDepsConfig } from './utils/getDepsConfig'; import { EsbuildSupportExts, globExcludeFiles } from './constant'; import { PkgLog, UserConfig, getPackageJson } from './utils'; -const serverGlobalFiles: string[] = ['src/**', '!src/client/**', ...globExcludeFiles]; -const clientGlobalFiles: string[] = ['src/**', '!src/server/**', ...globExcludeFiles]; -const dynamicImportRegexp = /import\((["'])(.*?)\1\)/g; - -const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx}', '!src/**/__tests__']; +const serverGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/client/**', ...globExcludeFiles]; +const clientGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/server/**', ...globExcludeFiles]; +const sourceGlobalFiles: string[] = ['src/**/*.{ts,js,tsx,jsx,mjs}', '!src/**/__tests__']; const external = [ // nocobase