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;