[@babel/babel-polyfill] allow use of Financial-Times/polyfill-library as polyfills-source
- Dominant language
- TypeScript
- Stars
- 357
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request
**Is your feature request related to a problem? Please describe.**
core-js is missing the important things. `ChildNode.remove()`, `fetch()`, `XMLHttpRequest()` ...
**Describe the solution you'd like**
possibility to use [Financial-Times/polyfill-library](https://github.com/Financial-Times/polyfill-library/) or any other source of polyfills while keeping the possibility of `useBuiltIns: 'usage'`, so babel-loader still only includes whats necessary.
**Describe alternatives you've considered**
Including a huge bundle of polyfills and/or gather the ones i need and/or have a mess of a setup of polyfilled and not polyfilled things while having half of the features polyfilled fully automatic by babel/polyfill.
**Teachability, Documentation, Adoption, Migration Strategy**
```js
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: [
'last 2 versions',
'ie >= 11'
]
},
useBuiltIns: 'usage',
polyfillSource: 'Financial-Times/polyfill-library' // or somthing like this
}
]
]
}
}
}
```
Contributor guide
Research direction
The issue names @babel/preset-env's useBuiltIns: 'usage' and a babel-loader configuration, but no repository files or tests. Start by tracing that option and the proposed polyfillSource behavior; done would mean selecting Financial-Times/polyfill-library or another source while retaining usage-based inclusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript, webpack
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100