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

feat(react): add react fast refresh to webpack #5612

Merged
merged 1 commit into from
May 18, 2021

Conversation

xiongemi
Copy link
Collaborator

@xiongemi xiongemi commented May 10, 2021

add fast refresh to react

Current Behavior

change files will cause a full page to reload

Expected Behavior

change files should only update components on the page

  • for react, nx serve <app> will enable fast refresh; for other app like angular, run nx serve <app> --hmr will enable fast refresh
  • nx serve --hmr=false` will disable fast refresh and go back to full page reload

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented May 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/2Y46jFaqnTu95vKEDrvZ8SwGsnuB
✅ Preview: https://nx-dev-git-fork-xiongemi-feat-add-react-fast-refresh-nrwl.vercel.app

@nx-cloud
Copy link

nx-cloud bot commented May 10, 2021

Nx Cloud Report

CI ran the following commands for commit 4d91a38. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx affected --target=build --parallel --max-parallel=3
#000000 nx affected --target=e2e
#000000 nx affected --target=lint --parallel --max-parallel=4
#000000 nx affected --target=test --parallel --max-parallel=2

Sent with 💌 from NxCloud.

@@ -26,6 +26,14 @@ Type: `string`

Target which builds the application

### hmr

Default: `false`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we enable by default so users will get the better experience out of the box?

And they can use --no-hmr or --hmr false to disable it.

@tianzhich
Copy link

nice to see this released

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
@xiongemi xiongemi deleted the feat/add-react-fast-refresh branch April 24, 2024 14:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants