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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable hot reloading - Fixes #2134 #2218

Merged
merged 8 commits into from
Aug 2, 2023

Conversation

lindapaiste
Copy link
Collaborator

Fixes #2134

Changes:

  • Replace deprecated package react-hot-loader with react-refresh.
  • Integrate react-refresh with webpack using package @pmmmwh/react-refresh-webpack-plugin.
  • Follow this example setup.
  • Replace webpack-hot-middleware with forked version @gatsbyjs/webpack-hot-middleware, which is up to date for webpack v5.
  • Minor version bump of react and react-dom to the highest v16 version (to fit these recommendations).

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. 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.
image

@lindapaiste lindapaiste requested a review from raclim July 13, 2023 02:03
Copy link
Collaborator

@raclim raclim left a 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!

client/modules/User/pages/AccountView.jsx Outdated Show resolved Hide resolved
@raclim raclim mentioned this pull request Jul 18, 2023
4 tasks
# Conflicts:
#	package-lock.json
#	package.json
Copy link
Collaborator

@raclim raclim left a 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.

@raclim raclim merged commit 31e64d5 into processing:develop Aug 2, 2023
1 check passed
@lindapaiste lindapaiste deleted the fix/hot-reload branch August 8, 2023 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improper setup of obsolete package react-hot-loader
2 participants