Skip to content

Disable the use of @babel/transform-runtime (solves #111) #113

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

Closed
wants to merge 1 commit into from

Conversation

edorivai
Copy link
Collaborator

@edorivai edorivai commented Dec 12, 2018

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 😄

@mjackson
Copy link
Member

Yes, we should have @babel/runtime as a dependency. I forgot to include it. The @babel/transform-runtime plugin ensures that we only include the pieces of @babel/runtime that we need so that we don't include the whole thing.

@edorivai
Copy link
Collaborator Author

Ah ok, even better then 👍

@mjackson mjackson closed this in 36b445f Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants