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

chore: upgrade to babel v7 #397

Merged
merged 1 commit into from Mar 13, 2020
Merged

Conversation

nolanlawson
Copy link

@nolanlawson nolanlawson commented Dec 29, 2019

What this PR does:

  • updates babel and its plugins/presets to v7 or equivalent
  • updates jest to latest
  • makes the dist-modern build use @babel/env with a list of latest Chrome/Edge/Firefox/Safari versions, rather than explicitly specifying every transform
  • makes the legacy dist and dist-es builds use @babel/env with its default settings (i.e. run all ES2015 transforms)
  • makes @babel/runtime an explicit dependency rather than devDependency
  • removes most of the src/polyfills

I figure we are better off just making @babel/runtime into an explicit dependency rather than trying to write our own. Based on my testing, it adds a minimal amount of overhead (~4kB), and it's unlikely that our own polyfills will beat the built-in Babel ones. Plus it's just a lot of extra code we have to maintain.

Also, we no longer have to worry about bugs like #393 where a core-js dependency accidentally sneaks into our build and we break anyone who doesn't have this dependency.

Future TODOs:

@EtienneLem EtienneLem merged commit 39c2c9d into master Mar 13, 2020
@EtienneLem EtienneLem deleted the nolan/update-babel-squashed branch March 13, 2020 12:10
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

2 participants