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

Upgrade babel #4814

Closed
wants to merge 6 commits into from
Closed

Upgrade babel #4814

wants to merge 6 commits into from

Conversation

bhollis
Copy link
Contributor

@bhollis bhollis commented Dec 18, 2019

No description provided.

@bhollis
Copy link
Contributor Author

bhollis commented Dec 18, 2019

This is where our 5% increase comes from!

@merceyz
Copy link

merceyz commented Dec 29, 2019

Try adding

version: require('@babel/runtime/package.json').version

here

DIM/babel.config.js

Lines 10 to 13 in ab6172f

'@babel/plugin-transform-runtime',
{
useESModules: true
}

@merceyz
Copy link

merceyz commented Dec 29, 2019

Don't know if this will reduce the bundle size but you can also add

corejs: require('core-js/package.json').version

here

DIM/babel.config.js

Lines 49 to 56 in ab6172f

'@babel/preset-env',
{
modules: false,
loose: true,
useBuiltIns: 'usage',
corejs: 3,
shippedProposals: true
}

Looking at https://babeljs.io/docs/en/babel-preset-react you can remove corejs from here

['@babel/preset-react', { useBuiltIns: true, loose: true, corejs: 3 }]

@bhollis
Copy link
Contributor Author

bhollis commented Dec 30, 2019

Nope, looks like that didn't help.

@bhollis
Copy link
Contributor Author

bhollis commented Dec 30, 2019

Comparing the sources, it looks like after upgrading babel we're no longer transpiling to latest-browser-supported features. It's going all the way back to es5 - no arrow functions, etc.

@bhollis
Copy link
Contributor Author

bhollis commented Dec 30, 2019

Filed babel/babel#10945 - I dug through the babel-preset-env code but I don't see where it could be going wrong in understanding our babel-preset-env query.

@delphiactual
Copy link
Contributor

we can temporarily add "not android <= 79" to package.json

@bhollis
Copy link
Contributor Author

bhollis commented Dec 30, 2019

@delphiactual I have a more comprehensive fix in #4839.

@bhollis bhollis closed this Dec 30, 2019
@delphiactual delphiactual deleted the upgrade-babel branch December 30, 2019 13:11
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.

None yet

3 participants