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
I set up a project using react and typescript with swc, changed base url and it broke auto reloading of components using hmr.
The bug seems to not be present on non swc template.
[vite] connecting...
client.ts:133 [vite] connected.
client.ts:462 [vite] hot updated: /src/App.tsx
The text was updated successfully, but these errors were encountered:
FrozenAlex
changed the title
Vite React+TS+SWC HMR breaks when base path is set to anything except '/'
Vite React+TS+SWC HMR breaks when the base path is set to anything except '/'
Jul 2, 2023
I set up a project using react and typescript with swc, changed base url and it broke auto reloading of components using hmr.
The bug seems to not be present on non swc template.
Minimal reproducible example
https://github.com/FrozenAlex/SWCViteBugExample
Steps to reproduce
Run
And change App.tsx to see the results.
Last commit is the only change it needs (adding base option to vite.config.ts)
Logs
Vite dev log (Click to expand!)
Browser logs (Click to expand!)
The text was updated successfully, but these errors were encountered: