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

Lock babel configuration back to IE 9 support (ES5) #5033

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 19, 2018

Because of how tuned our babel configuration is we can't reliably let users target what browser's they'd like to support without everything else falling apart.

If we use just preset-env users are left with a suboptimal bundle or something that requires other configuration, so this is the best option for now.

@Timer Timer added this to the 2.0.0 milestone Sep 19, 2018
@@ -45,14 +45,22 @@ module.exports = function(api, opts, env) {
require('@babel/preset-env').default,
{
targets: {
node: '6.12',
node: 'current',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This somehow got goofed during an old merge commit, but current is the behavior we want.

@Timer
Copy link
Contributor Author

Timer commented Sep 19, 2018

Appears to have worked, the bundle is valid and it passes a tool check:

joes-mbp:website joe$ npx es-check es5 'build/**/*.js'
ES-Check: there were no ES version matching errors!  🎉
joes-mbp:website joe$ npx es-check es3 'build/**/*.js'
ES-Check: there were 2 ES version matching errors.
<snip>

@Timer Timer merged commit c9e1876 into facebook:next Sep 19, 2018
@Timer Timer deleted the compile-to-es5 branch September 19, 2018 19:54
@lixiaoyan
Copy link
Contributor

Please use forceAllTransforms: true instead to keep browserslist config works with useBuiltIns: 'entry' thanks.

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants