Skip to content
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

Update polyfilling with core-js #363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GertSallaerts
Copy link

@GertSallaerts GertSallaerts commented Nov 3, 2021

Problem

  • core-js@2 is obsolete and pollutes the global namespace
  • @babel/preset-env's corejs: 3 option includes core-js@3 and its polyfills pollute the global namespace too
  • @babel/plugin-transform-runtime's corejs: 3 option includes core-js-pure@3 which does not pollute the global namespace but polyfills everything regardless of the targets specified by preset-env.

Would also resolve #342

Solution

By using the new Babel Polyfills we can include modern and pure polyfills based on the targets config (none is specified in twitter-text so it will use the default) in the root of babel config.

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2021

CLA assistant check
All committers have signed the CLA.

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.

core-js outdated
2 participants