Skip to content

Update polyfilling with core-js#363

Open
GertSallaerts wants to merge 1 commit into
twitter:masterfrom
ambassify:chore/upgrade-core-js
Open

Update polyfilling with core-js#363
GertSallaerts wants to merge 1 commit into
twitter:masterfrom
ambassify:chore/upgrade-core-js

Conversation

@GertSallaerts

@GertSallaerts GertSallaerts commented Nov 3, 2021

Copy link
Copy Markdown

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

CLAassistant commented Nov 3, 2021

Copy link
Copy Markdown

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