Skip to content

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