Does babel-polyfills have any strategy to deal with repeated injection of different version of core-js library?
- Dominant language
- TypeScript
- Stars
- 357
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Quoted from [there](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md#polyfills-collector):
> Your dependencies could have their own core-js dependencies and they can be incompatible with the core-js version that you use at the root of your project, so injecting core-js imports to your dependencies directly could cause breakage.
and [more](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md#globalization-of-pure-version-polyfills--ponyfills):
> One more popular and similar issue is a duplication of polyfills from global and pure core-js versions. The pure version of core-js / babel-runtime is intended for usage in libraries' code, so it's a normal situation if you use a global version of core-js and your dependencies also load some copies of core-js without global namespace pollution. They use different internals and it's problematic to share similar code between them.
Contributor guide
Research direction
Start with the two linked core-js documentation sections and inspect how babel-polyfills currently handles injected polyfills. Establish the expected strategy for repeated or incompatible core-js versions, then document the decision and any required scope; the issue names no files or tests to run.
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