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

babel-polyfill: generate individual files for each shim #5553

hzoo opened this Issue Mar 27, 2017 · 2 comments


None yet
2 participants

hzoo commented Mar 27, 2017

Choose one: is this a bug report or feature request?: feature request

Expected Behavior

it would be more intuitive and also less weird (for npm 2, yarn?) if babel-preset-env just changed into babel-polyfill still

import "core-js/string.pad-start";
import "core-js/string.pad-end";

Current Behavior

Currently turns

import "babel-polyfill";


import "core-js/modules/es7.string.pad-start";
import "core-js/modules/es7.string.pad-end";

Possible Solution

Generate the extra module files to be used by preset-env instead of just the one polyfill.js file in

Need to modify to generate the individual polyfills


This comment has been minimized.

andimarek commented Apr 3, 2017


I would help with this issue, but I need a bit guidance. :-)

Shouldn't the expected behavior to be imports from babel-polyfill:

import "babel-polyfill/string.pad-start";
import "babel-polyfill/string.pad-end";

instead from core-js?

Otherwise generating new module files in babel-polyfill wouldn't make much sense, I think.



This comment has been minimized.


hzoo commented Apr 7, 2017

@andimarek yeah must of been my typo

Done in #5584 and released with alpha 7

@hzoo hzoo closed this Apr 7, 2017

@lock lock bot added the outdated label May 4, 2018

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018

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