Disable the use of @babel/transform-runtime (solves #111) #113
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.
As described in #111, the upgrade to 1.9.0 introduces a dependency on
@babel/runtime
without marking it a (peer)dependency.This setup works well for projects that already have
@babel/runtime@^7
set up, but for those that do not, we will break their build.The purpose of
@babel/transform-runtime
is to reuse duplicate pieces of transpiled code, so now that I've removed it, the bundle sizes have increased. The only alternative I can think of is to make@babel/runtime
a dependency. This would be a no-op in case a project already depends on it, and it would guarantee that this packages works "out-of-the-box". However, in case a project isn't using@babel/runtime
yet, we would introduce the entire babel runtime into their bundle, even though we only use a portion of it.@mjackson I'd love to hear your take on this (and that of anyone else for that matter). However, if there's no response here after some time I'll just go ahead and publish this 😄