From 2f9d1a4b76cbf63859505eab01d7d70759a683a6 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 24 Oct 2024 20:56:09 +0800 Subject: [PATCH] fix: allow Rsbuild plugin to be registered times (#3818) --- packages/core/src/pluginManager.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/core/src/pluginManager.ts b/packages/core/src/pluginManager.ts index 5265d78c83..df8c81868c 100644 --- a/packages/core/src/pluginManager.ts +++ b/packages/core/src/pluginManager.ts @@ -79,17 +79,7 @@ export function createPluginManager(): PluginManager { validatePlugin(newPlugin); - const existPlugin = plugins.find( - (item) => - item.instance.name === newPlugin.name && - item.environment === environment, - ); - - if (existPlugin) { - logger.warn( - `Rsbuild plugin "${newPlugin.name}" registered multiple times.`, - ); - } else if (before) { + if (before) { const index = plugins.findIndex( (item) => item.instance.name === before, );