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
Parcel 2.0.0 not reloading page on change anymore (Parcel 2.0.0-rc.0 still works fine) #7241
Comments
Looks like #6685 is similar, however, there are no errors, even when preserving the log, just console cleared. |
I have the same behaviour (using a proxyrc file and commonJs
no error, it silently fails. |
Same, it's rather annoying.
|
The changes made to the hmrAcceptCheck function in this commit are a bit sus: 7468864#diff-fa61a8f9c88b99c211b1544b5549ddc7137a02632c9fa8486875101aba57c356R337 But I am not 100% certain, there are many other factors that could affect it. |
I'm having this same problem too. Running the RC gets reloading to work again, though other issues arise. Parcel 2.0.1 is what I currently have, and I've noticed that including classic JS files (not ES modules) is what causes reloading to not happen anymore. Trying this (#1591 (comment)) gets reloading to work, but I don't want to have to rewrite my code to get things to work again. |
We are also having this problem. Like ideaOwl commented, we have classic JavaScript files linked with type="text/javascript" in our main entry point (index.html). The linked .js files are, however, from a third party, so we cannot add any code to them. Furthermore, our app is not compiled correctly by Parcel 2.0.0-rc.0, so I can't determine whether this issue occurs for us in rc.0. When rc.0 compiles our app, the objects created in our classic .js files are not found at runtime. Thanks in advance for any help/fix. |
I can confirm that this does not work for me as well.
I have first tried running the script with the I have changed from Then I've created new .js files that I import inside This bug kills productivity when you're trying to watch tutorials and you do the exact same things as the tutor, but it doesn't work as expected and then you have to search endlessly for a solution. |
I ended up upgrading to parcel 2.0.1 and just including this in my main js file: if (module.hot) {
module.hot.accept(() => {
location.reload()
})
} Which works for now. But, the default behavior should be either working HMR or page reload. |
Any update on this issue? @ayebear's fix does not seem to work for us. |
🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
.parcelrc
package.json
relevant lines🤔 Expected Behavior
Page should reload when editing a file.
😯 Current Behavior
Nothing changes, but the browser console gets cleared. No new code gets injected. Have to manually refresh to see code changes.
💁 Possible Solution
No idea how to fix this, but I suspect it's related to this if statement branching differently between 2.0.0 and 2.0.0-rc.0:
https://github.com/parcel-bundler/parcel/blob/v2.0.0/packages/runtimes/hmr/src/loaders/hmr-runtime.js#L113
Downgrading my packages to 2.0.0-rc.0 corrects the issue for me.
🔦 Context
This is for a pixi.js game project.
💻 Code Sample
I'll try to make a minimal example later that reproduces this issue.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: