Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
dist-modern
build use@babel/env
with a list of latest Chrome/Edge/Firefox/Safari versions, rather than explicitly specifying every transformdist
anddist-es
builds use@babel/env
with its default settings (i.e. run all ES2015 transforms)@babel/runtime
an explicitdependency
rather thandevDependency
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:
_JSON
, it shouldn't be needed anymore (refactor: remove _JSON #402)requestAnimationFrame
polyfill only run in Node (it's not needed in the browser) (fix: remove rAF polyfill, add SSR test #401)