Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: HMR not working with filesystem routes #1389

Open
2 tasks done
Brendonovich opened this issue Mar 14, 2024 · 3 comments
Open
2 tasks done

[Bug?]: HMR not working with filesystem routes #1389

Brendonovich opened this issue Mar 14, 2024 · 3 comments
Labels
bug Something isn't working vinxi related to vinxi

Comments

@Brendonovich
Copy link
Contributor

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Editing a file in routes/ that has a default export will cause a full reload, rather than use HMR.

Expected behavior 馃

HMR should work like in all other files

Steps to reproduce 馃暪

Steps:

  1. Go to https://stackblitz.com/edit/github-htmjmk-karq32?file=src%2Froutes%2Findex.tsx
  2. Try editing each component.
  3. Notice that HMR doesn't work in routes/index.tsx, but works in IHaveHMR.tsx and routes/MeToo.tsx

Context 馃敠

i like hmr, nuff said

Your environment 馃寧

No response

@Brendonovich Brendonovich added the bug Something isn't working label Mar 14, 2024
@lxsmnsyc
Copy link
Member

lxsmnsyc commented Mar 14, 2024

This is expected, see: https://github.com/solidjs/solid-refresh?tab=readme-ov-file#how-it-works

We used to have this feature before but it was problematic, so always give components a name.

Relevant Discord discussion: https://discord.com/channels/722131463138705510/722131463889223772/1216948069602689155

@Brendonovich
Copy link
Contributor Author

@lxsmnsyc only allowing named components makes sense, but is that the reason why ButNotMe doesn't have HMR even though it's named?
image

@lxsmnsyc
Copy link
Member

@Brendonovich the transform is correct for this one, however I'm confident that something else might be contributing to this behavior, maybe Vinxi.

@lxsmnsyc lxsmnsyc reopened this Mar 15, 2024
@ryansolid ryansolid added the vinxi related to vinxi label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vinxi related to vinxi
Projects
None yet
Development

No branches or pull requests

3 participants