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 fast refresh support for webpack 5 #6529

Merged
merged 1 commit into from Jul 29, 2021

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jul 28, 2021

This PR enables fast refresh for React and webpack 5.

Current Behavior

Upgrading to webpack 5 breaks fast refresh.

Expected Behavior

Upgrading to webpack 5 supports fast refresh

Related Issue(s)

Fixes #6506

@vercel
Copy link

vercel bot commented Jul 28, 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/6CSBWYDPfK4SaCpVeA7fwX4g4Uat
✅ Preview: Canceled

[Deployment for 8b66c73 canceled]

);
const entryFiles: FileInfo[] = entrypoint
?.getFiles()
?.filter((f) => !f.endsWith('.hot-update.js'))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is needed to avoid hot-update files from being included in generated HTML (which breaks).

@jaysoo jaysoo force-pushed the webpack5-react-fast-refresh branch from 63e0b98 to a6ee594 Compare July 28, 2021 15:22
@FrozenPandaz FrozenPandaz enabled auto-merge (squash) July 29, 2021 17:47
@FrozenPandaz FrozenPandaz merged commit 70c0921 into nrwl:master Jul 29, 2021
ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this pull request Sep 16, 2021
@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
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.

Livereload or HMR on Nx 12.6, Webpack5 & React App
2 participants