From b514c106175ba5359d18b5566826da4a39f1d694 Mon Sep 17 00:00:00 2001 From: "gaoyuan.1226" Date: Wed, 26 Jun 2024 14:18:35 +0800 Subject: [PATCH] fix: remove useless await --- packages/core/src/provider/initConfigs.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/src/provider/initConfigs.ts b/packages/core/src/provider/initConfigs.ts index 124dab4fbb..bce513b7f6 100644 --- a/packages/core/src/provider/initConfigs.ts +++ b/packages/core/src/provider/initConfigs.ts @@ -1,6 +1,7 @@ import type { InspectConfigOptions, MergedEnvironmentConfig, + ModifyEnvironmentConfigUtils, NormalizedEnvironmentConfig, PluginManager, RsbuildEntry, @@ -42,8 +43,8 @@ async function modifyEnvironmentConfig( logger.debug(`modify Rsbuild environment(${name}) config`); const [modified] = await context.hooks.modifyEnvironmentConfig.call(config, { name, - // @ts-expect-error - mergeEnvironmentConfig: mergeRsbuildConfig, + mergeEnvironmentConfig: + mergeRsbuildConfig as ModifyEnvironmentConfigUtils['mergeEnvironmentConfig'], }); logger.debug(`modify Rsbuild environment(${name}) config done`); @@ -144,7 +145,7 @@ export async function initRsbuildConfig({ server, } = normalizeBaseConfig; - for await (const [name, config] of Object.entries(mergedEnvironments)) { + for (const [name, config] of Object.entries(mergedEnvironments)) { const environmentConfig = await modifyEnvironmentConfig( context, config,