Closed utrolig closed 1 year ago
I've done some more debugging myself and it seems like its related to the pages
folder?
If I move everything out of the pages
and into a components
folder and delete the pages
folder I'm able to get it to work again.
This didn't help in my actual project.
So, this wasn't related to the router at all, but rather how folder/filenames on windows filesystems work.
So the import comes from import { SpacesOverview } from "./Spaces/SpacesOverview";
but the folder name is actually spaces
.
On windows the import still works, but HMR breaks.
When I tried to run it on my WSL, I got an error message instantly, changed the import, and everything works.
On macOS I hit a similar issue, unrelated to HMR and solved it by using tsc --forceConsistentCasingInFileNames
. So I get warned by typescript at least.
Describe the bug
HMR seems to completely break if using @solidjs/router
I don't know if I'm doing anything weird here, but I've created a very minimal reproduction example.
Your Example Website or App
https://github.com/utrolig/solid-router-hmr-bug
Steps to Reproduce the Bug or Issue
src/pages/spaces/SpacesOverview.tsx
Expected behavior
I expected HMR to work and update my page when I edit the file.
Platform