-
Notifications
You must be signed in to change notification settings - Fork 6.3k
fix: remove hard-coded React alias that points to the wrong location and break the dev render #9842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import { defineConfig } from 'vite'; | ||
| import tailwindcss from '@tailwindcss/vite'; | ||
| import { resolve } from 'path'; | ||
|
|
||
| // https://vitejs.dev/config | ||
| export default defineConfig({ | ||
|
|
@@ -10,14 +9,6 @@ export default defineConfig({ | |
|
|
||
| plugins: [tailwindcss()], | ||
|
|
||
| resolve: { | ||
| dedupe: ['react', 'react-dom'], | ||
| alias: { | ||
| react: resolve(__dirname, 'node_modules/react'), | ||
| 'react-dom': resolve(__dirname, 'node_modules/react-dom'), | ||
| }, | ||
| }, | ||
|
|
||
| build: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
With the Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under node-linker=hoisted there's a single hoisted React copy. So dedupe is a no-op here; #8757's duplicate came from a stale node_modules, now covered CONTRIBUTING. Keeping dedupe would just be defensive |
||
| target: 'esnext' | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lifeizhou-ap I think we can keep dedupe and just remove alias ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Abhijay007,
The above comment asks the same thing, I've replied to it above. TLDR: It does not hurt to add in, but it is unnecessary.