From 411331f064684a1a1d41a08bafed997255ebf6b2 Mon Sep 17 00:00:00 2001 From: lazarv Date: Sun, 30 Jun 2024 12:33:22 +0200 Subject: [PATCH] fix: add react and react-dom to resolve.dedupe at config --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 4eaa8b2..378a3a5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -94,6 +94,9 @@ const react = (_options?: Options): PluginOption[] => { include: [`${options.jsxImportSource}/jsx-dev-runtime`], esbuildOptions: { jsx: "automatic" }, }, + resolve: { + dedupe: ['react', 'react-dom'], + }, }), configResolved(config) { if (config.server.hmr === false) hmrDisabled = true;