babel / babel/babel-polyfills

Does babel-polyfills have any strategy to prevent creating cycles?

Open
#195 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
357
Forks
62
PR merge metrics
No merged PRs in 30d

Description

From https://github.com/babel/babel/issues/8754:

> Compilation of `node_modules` is becoming more common as more packages are publish as ES6.
>
> This is causing problems in two ways:
>
> * `transform-runtime` can potentially insert references to `core-js` into `core-js` itself
> * `transform-runtime` can potentially insert references to `@babel/runtime-corejs2` into `core-js` itself
> * `transform-runtime` can potentially insert references to `@babel/runtime-corejs2` into _itself_, causing dependency cycles
> * And similar with `useBuiltins: 'usage'` transforming `core-js`.
> [...]

I think the same question needs to be discussed here.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked Babel issue 8754 and the examples in this issue concerning transform-runtime, core-js, @babel/runtime-corejs2, and useBuiltins: 'usage'. Determine whether babel-polyfills has an established cycle-prevention strategy and document or agree on the intended approach; the issue is complete when that strategy and its scope are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.