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

Replace invariant with shorter version in production #597

Merged
merged 1 commit into from
Jun 29, 2018
Merged

Replace invariant with shorter version in production #597

merged 1 commit into from
Jun 29, 2018

Conversation

TrySound
Copy link
Contributor

@TrySound TrySound commented Jun 29, 2018

4kb less to parse, 1kb less to load in production

@@ -58,12 +58,11 @@ export default [
// Only deep dependency required is React
external: ['react'],
plugins: [
// Setting production env before running babel etc
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did this need to move down?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we need to replace NODE_ENV after babel generate them. replace should be always in the end before minification.

@alexreardon alexreardon merged commit 4a3a083 into atlassian:dev Jun 29, 2018
@TrySound TrySound deleted the convert-dev-expressions branch June 29, 2018 23:32
@alexreardon
Copy link
Collaborator

alexreardon commented Jun 29, 2018 via email

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.

2 participants