-
Notifications
You must be signed in to change notification settings - Fork 22
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes in linked dependencies don't cause hmr #38
Comments
Hmm... That’s odd. From Vite’s perspective, the partial is part of the HTML file it’s injected into, so I would expect this to work correctly. I’ll do some investigation locally and see if I can reproduce that error; I haven’t noticed the problem myself, but I’m using Tailwind in the project I made this plugin for, so I don’t really ever edit my CSS file! |
This is what im dealing with. Changes to the scss don't trigger a reload, neither do linked scripts in the base.html when browsing to page.html. page.html
base.hbs
|
Can you try changing your |
Same behavior as before. Could be a vite bug, this issue sounds familiar: |
Interesting! Let's keep an eye on the Vite bug and see if that's the culprit; I don't want to shirk responsibility but it's unlikely that the issue here has something to do with this plugin since, from Vite's perspective, the resolved file with all of it's partials are just a single HTML file that it would process as usual. |
Very interesting! Thanks for investigating a bit more. My job has me pretty busy so I won't be able to look into this the next few days, during the day, at least, but I'll try to look into this more this weekend! If you're able to post a repo somewhere with a set-up that makes it easy for me to reproduce the issue, that would go a long way toward helping me get this addressed quickly! |
Sure! https://github.com/Bohreromir/vite-hmr-bug-test |
Got it! Thanks! |
Your reproduction repo was super helpful! It turns out that returning an empty array basically blocked all modules from being hot-reloaded. I tried to write a test against this in the codebase here but there's really no way to hook in and check whether the event was emitted or not. I did try this out locally, though, and it's working now! |
Released in |
Looks good to me, thanks! |
Hello! Seem to have the same exact bug there ;) "vite-plugin-handlebars": "^1.6.0"
"vite": "^2.7.13"
|
Problem found! |
If there is a <script> or css load inside of a partial, it seems like changes in that file won't trigger a reload.
The text was updated successfully, but these errors were encountered: