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

Address duplicate core-js import #9097

Open
lerayne opened this Issue Nov 29, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@lerayne

lerayne commented Nov 29, 2018

Feature Request

This is related to @babel/preset-env and @babel/runtime

useBuiltIns:usage is a great feature that helps avoiding unnecessary polyfills. The drawback though is that other libraries still import core-js explicitly. Because of that, I usually have many core-js modules imported twice:

image

Once as /core-js/modules (via @babel/runtime with 'useBuiltIns:usage') and the second time as /core-js/library/modules

I assume there should be the way to avoid that. Like, for @babel/runtime to import core-js as /core-js/library/modules or programmatically detect polyfills that are already imported

@babel-bot

This comment has been minimized.

Collaborator

babel-bot commented Nov 29, 2018

Hey @lerayne! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@zloirock

This comment has been minimized.

Member

zloirock commented Nov 29, 2018

It's rather an issue for a bundler. You could add a mapping core-js/library -> core-js to webpack. However, you can get some problems with a difference of versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment