File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11import { defineConfig } from 'vite'
22import react from '@vitejs/plugin-react'
3+ import path from 'path'
34
45export default defineConfig ( {
56 plugins : [ react ( ) ] ,
67 base : '/admin/ui/' ,
78 resolve : {
8- // Prevent multiple React copies (fixes hooks/dispatcher issues)
9- dedupe : [ 'react' , 'react-dom' ]
9+ // Ensure a single React/DOM copy is bundled and referenced
10+ dedupe : [ 'react' , 'react-dom' ] ,
11+ alias : {
12+ react : path . resolve ( __dirname , 'node_modules/react' ) ,
13+ 'react-dom' : path . resolve ( __dirname , 'node_modules/react-dom' ) ,
14+ 'react/jsx-runtime' : path . resolve ( __dirname , 'node_modules/react/jsx-runtime' ) ,
15+ 'react/jsx-dev-runtime' : path . resolve ( __dirname , 'node_modules/react/jsx-dev-runtime' ) ,
16+ }
1017 } ,
1118 css : {
1219 // Prevent PostCSS from walking up outside the project (avoids permission errors)
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments