From b7c833308d2be1904017cd8302fa253203c6dfa8 Mon Sep 17 00:00:00 2001 From: rhliu1996 <103995577+rhliu1996@users.noreply.github.com> Date: Sun, 24 Dec 2023 06:39:26 +0800 Subject: [PATCH] Update index.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持preact --- packages/plugin-react/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 05eb04668..21c6b7864 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -7,7 +7,7 @@ const supportFrameworks = ['react', ...reactLike]; export default (ctx: IPluginContext) => { const { framework } = ctx.initialConfig; - if ((framework && !supportFrameworks.includes(framework)) || !getReactPath()) + if ((framework && !supportFrameworks.includes(framework)) || !getReactPath(framework)) return; ctx.modifyWebpackChain(({ chain, webpack }) => {