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

Turbopack: Disable react_refresh code in production #75535

Merged

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Jan 31, 2025

What?

Ensures we don't inject React refresh helpers in production:

'object' == typeof globalThis.$RefreshHelpers$ &&
  null !== globalThis.$RefreshHelpers &&
  p.registerExports(v, globalThis.$RefreshHelpers$);

Also skips trying to resolve the react-refresh package.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. Turbopack Related to Turbopack with Next.js. labels Jan 31, 2025
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@timneutkens timneutkens marked this pull request as ready for review January 31, 2025 20:25
@timneutkens timneutkens force-pushed the 01-31-turbopack_disable_react_refresh_code_in_production branch from 2ccceb9 to 3206d63 Compare February 3, 2025 11:23
@timneutkens timneutkens merged commit 6f03bb2 into canary Feb 3, 2025
131 checks passed
@timneutkens timneutkens deleted the 01-31-turbopack_disable_react_refresh_code_in_production branch February 3, 2025 14:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team. locked Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants