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

[core] Fix the es distribution #10254

Merged
merged 3 commits into from Feb 12, 2018
Merged

[core] Fix the es distribution #10254

merged 3 commits into from Feb 12, 2018

Conversation

NMinhNguyen
Copy link
Contributor

@NMinhNguyen NMinhNguyen commented Feb 12, 2018

You can view the diff between the current and proposed build output here: https://github.com/NMinhNguyen/material-ui/commit/503bf240c24fa4bb3b9d00ff85b7a659d97f74a2

See #10212 (comment) for more context.

It's easier to review the individual commits by the way.

The main changes that concern me with this are things like Object.keys being replaced with transform-runtime, e.g. in https://github.com/NMinhNguyen/material-ui/commit/503bf240c24fa4bb3b9d00ff85b7a659d97f74a2#diff-d4e87d828003c3d0ed59409b821149b9R1. I suppose we could prevent this by not using transform-runtime if ENV === 'es' here?

Closes #10212

Setting `NODE_ENV=production` when `BABEL_ENV=es`
should now allow production Babel transforms to be applied
@NMinhNguyen NMinhNguyen changed the title Production babel plugins [build] Production Babel plugins Feb 12, 2018
@oliviertassinari oliviertassinari changed the title [build] Production Babel plugins [core] Production Babel plugins Feb 12, 2018
@oliviertassinari oliviertassinari self-assigned this Feb 12, 2018
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Feb 12, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 12, 2018

@NMinhNguyen Thanks for working on it. I have flattened the .babelrc configuration. This is important. I would rather sacrifice DRY for explicitness and peace of mind.

The main changes that concern me with this are things like Object.keys being replaced with transform-runtime

This is a good thing. It avoids code duplication. I have subscribed to the following issues so we can improve the approach in the future:

@oliviertassinari oliviertassinari changed the title [core] Production Babel plugins [core] Fix the es distribution Feb 12, 2018
@oliviertassinari oliviertassinari merged commit 66e6dc0 into mui:v1-beta Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants