-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Hot reloading refreshes page but does not propagate changes #1301
Comments
Do the filenames change ? Maybe the js file is cached in the browser. |
@dobesv I doubt this is the issue. The files are Additionally, when developing, the DevTools panel is open with the "Disable cache (while DevTools is open)" options on. |
Upon further investigation, I have ruled out chokidar as being the cause for this. Chokidar IS detecting the file change, this is what causes the reload to happen. Parcel is just not recognizing the change to cause a recompile of the affected files. |
Do you still have this issue? You haven't posted any details regarding your code, so a reproduction would be great. |
We stopped using Parcel and went to a more stable package bundler. |
This a 🐛 bug report.
I have several .jsx files. When these are updated, the site reloads with the changes applied.
However, these .jsx files also have imports of CommonJS .js modules. When these files are changed, the browser auto-refreshes like with the .jsx files, however the changes do not take effect. Manually refreshing the browser causes the changes to take effect.
These CommonJS files are imported using the module-resolver plugin and are stored in the "modules" folder at the root level (so next to the "node_modules" folder).
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
When a change is made and saved to an imported CommonJS file, the hot reload should happen with the changes in effect.
😯 Current Behavior
When a change is made and save to an imported CommonJS file, the hot reload appears to happen, but the changes are not in effect. A hard reload of the browser causes the changes to take effect.
💁 Possible Solution
¯\(ツ)/¯
🔦 Context
We store most of our major logic in very small functions in libraries and leave the .jsx files to be the view layer only. Since we do most of our main logic changes in these imported files, the fact that they require a hard reload on every change makes the development very cumbersome and annoying.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: