You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HMR does not work. Full page reloads happen instead.
Originally thought this might be solved by #188 (comment) but discussion there showed it was not.
This might be marked won't fix because Vite recommends the jsx/tsx extensions. However I thought it was worth a specific bug ticket even if its closed so there is a record of the decision.
Please note that create-react-app (where I'm porting from), nextjs and gatsby all support .js and this would help minimize the changes to port apps.
This has been fixed in #188 I think.
Anyway this will not be better supported in Vite. esbuild, swc and bun agreed to not enable the JSX parser on JS files. Plus most codebases are now in TS and the extension is mandatory. Migrating now will simplify a lot the setup of future tools. There are plenty of one line command available on the gitst/stack overflow to migrate.
This has been fixed in #188 I think. Anyway this will not be better supported in Vite. esbuild, swc and bun agreed to not enable the JSX parser on JS files. Plus most codebases are now in TS and the extension is mandatory. Migrating now will simplify a lot the setup of future tools. There are plenty of one line command available on the gitst/stack overflow to migrate.
Describe the bug
Using the jsx loader for js as files as per:
vitejs/vite#3448 (comment)
HMR does not work. Full page reloads happen instead.
Originally thought this might be solved by #188 (comment) but discussion there showed it was not.
This might be marked won't fix because Vite recommends the jsx/tsx extensions. However I thought it was worth a specific bug ticket even if its closed so there is a record of the decision.
Please note that create-react-app (where I'm porting from), nextjs and gatsby all support .js and this would help minimize the changes to port apps.
Reproduction
https://stackblitz.com/edit/vitejs-vite-p5o1nn?file=src%2FApp.js
Steps to reproduce
(Changing something in App.js)System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: