From 72346aec58b35f803cb3b792ef081ac04bfd52b1 Mon Sep 17 00:00:00 2001 From: Prakash Date: Tue, 2 Jun 2026 18:57:41 +0530 Subject: [PATCH] update vite.config.ts --- examples/react/vite.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/react/vite.config.ts b/examples/react/vite.config.ts index 6535e3b1f..775b6622a 100644 --- a/examples/react/vite.config.ts +++ b/examples/react/vite.config.ts @@ -6,4 +6,11 @@ import { defineConfig } from 'vite' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], + // @vitejs/plugin-react v5+ no longer adds react/react-dom to resolve.dedupe + // automatically (it did in v4). Without deduping, the linked @uppy/react + // workspace pulls in a second React copy, causing "Invalid hook call". + // https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md (v5.0.0) + resolve: { + dedupe: ['react', 'react-dom'], + }, })