-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Enable hot reloading - Fixes #2134 #2218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your work and sorry it took so long to get to this, this really does improve the developer experience! This looks great to me so far besides the portion that I commented on!
# Conflicts: # package-lock.json # package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! I might be wrong, but I think the hot reloading messages disappear once some of the deprecation warnings are addressed.
Fixes #2134
Changes:
react-hot-loader
withreact-refresh
.react-refresh
with webpack using package@pmmmwh/react-refresh-webpack-plugin
.webpack-hot-middleware
with forked version@gatsbyjs/webpack-hot-middleware
, which is up to date for webpack v5.react
andreact-dom
to the highest v16 version (to fit these recommendations).I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123
This PR improves the developer experience by allowing changes in the code to show up immediately without reloading the whole page. React and redux state will stay active even when code is changed.
The only weird thing is that hot reloading messages from the embedded preview app will show up in the editor console. I don't think it's a big deal.