-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add necessary polyfills to support transpiled features. #702
Comments
We can also remove the browser targets from the |
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
I also think we should remove the |
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702.
* Add supported browsers list to babel-preset-env. This was fixed in v7 of babel-preset-env so that you could use the browserslist directly from package.json. We'll have to wait until Babel v7 is release, see #702. * add node 6 to babel-preset-env targets * Only build for Node during testing.
Babel 7 also affects the EDIT: Actually the new EDIT: Actually, they're not exactly the same. The ENV one pulls in only the polyfills that are needed for the supported browsers, but it adds them to the global scope. Transform-runtime adds them for everything, even when supported, but only adds them to the module scope. See babel/babel#7267 for details. |
If the discussion in babel/babel#6628 takes off, that would be nice. |
Just did some testing with Babel I propose that we do: ["@babel/preset-env", {
"modules": false,
"useBuiltIns": "usage" // Add necessary polyfills to the global scope.
}] Only use the runtime transform for helpers. We probably don't really need this anyway -- we're not transpiling much anyway with only the last 2 versions of browsers -- so it probably won't really change size. ["@babel/plugin-transform-runtime", {
"helpers": true,
"useBuiltIns": true,
"useESModules": true,
"polyfill": false,
"regenerator": false
}] |
I'm with that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this as outdated. Please re-open if necessary. |
We transpile our JS code, but it doesn't necessarily support everything (see https://babeljs.io/docs/usage/caveats/). When
babel-preset-env
v7 is released, we can useuseBuiltIns: "usage"
to automatically add any polyfills needed after transpilation.The text was updated successfully, but these errors were encountered: