With React Router: Uncaught SyntaxError: Identifier 'RefreshRuntime' has already been declared #24
Replies: 1 comment
-
The issue is in React Router's Vite Plugin which doesn't allow adding Babel plugins, so when you use the React plugin it injects the refresh runtime twice: remix-run/react-router#12352 A workaround is to use the plain Vite Babel plugin for fbtee + the React Router plugin. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
Could somebody help me understand why there's apparently an HMR issue in conjunction with e.g. React Router v7?
Namely there's
Uncaught SyntaxError: Identifier 'RefreshRuntime' has already been declared
. It looks like the HMR is added twice, with that leading to an issue (and the second one not being fully added).In the browser I can see:
For a sample see the pr #21.
Beta Was this translation helpful? Give feedback.
All reactions