From 55745b79011556d0b38dec45f32b665e9902521c Mon Sep 17 00:00:00 2001 From: "gaoyuan.1226" Date: Fri, 28 Jun 2024 15:40:10 +0800 Subject: [PATCH] fix: remove environment context.target --- packages/core/src/createContext.ts | 1 - packages/core/tests/__snapshots__/environments.test.ts.snap | 2 -- packages/shared/src/types/hooks.ts | 1 - 3 files changed, 4 deletions(-) diff --git a/packages/core/src/createContext.ts b/packages/core/src/createContext.ts index ab4127f0b4..3759429b48 100644 --- a/packages/core/src/createContext.ts +++ b/packages/core/src/createContext.ts @@ -149,7 +149,6 @@ export async function updateEnvironmentContext( context.environments[name] = { index, name, - target: config.output.target, distPath: getAbsoluteDistPath(context.rootPath, config), entry, browserslist, diff --git a/packages/core/tests/__snapshots__/environments.test.ts.snap b/packages/core/tests/__snapshots__/environments.test.ts.snap index 1965d55feb..fa63fe2339 100644 --- a/packages/core/tests/__snapshots__/environments.test.ts.snap +++ b/packages/core/tests/__snapshots__/environments.test.ts.snap @@ -125,7 +125,6 @@ exports[`environment config > should normalize context correctly 1`] = ` "htmlPaths": {}, "index": 0, "name": "ssr", - "target": "node", "tsconfigPath": undefined, }, "web": { @@ -254,7 +253,6 @@ exports[`environment config > should normalize context correctly 1`] = ` "htmlPaths": {}, "index": 1, "name": "web", - "target": "web", "tsconfigPath": undefined, }, } diff --git a/packages/shared/src/types/hooks.ts b/packages/shared/src/types/hooks.ts index d464bddde4..f5f3e32c93 100644 --- a/packages/shared/src/types/hooks.ts +++ b/packages/shared/src/types/hooks.ts @@ -122,7 +122,6 @@ export type ModifyEnvironmentConfigFn = ( export type EnvironmentContext = { index: number; name: string; - target: RsbuildTarget; entry: RsbuildEntry; htmlPaths: Record; distPath: string;