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

Use webpack IgnorePlugin to exclude 'react-is' from production build #6084

Merged
merged 2 commits into from Jan 18, 2019

Conversation

dav-is
Copy link
Contributor

@dav-is dav-is commented Jan 18, 2019

react-is isn't used in production, so we shouldn't bundle it.

Note: most of those plugins are using the dev variable, but in case someone runs NODE_ENV=development next build, they would need a copy of react-is because the conditional use of react-is checks NODE_ENV — not whether or not HMR is being used (what what the dev variable is based on).

@timneutkens
Copy link
Member

process.env.NODE_ENV is always set to production when !dev, because webpack mode: 'production' sets it.

@timneutkens timneutkens merged commit 8065130 into canary Jan 18, 2019
@dav-is dav-is deleted the fix/react-is-dev-only branch January 18, 2019 19:47
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
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.

None yet

2 participants