This project uses Babel to replace missing functionality with core-js-pure
"ponyfills" (polyfills as modules, without globally patching browser built-ins)
See config .browserslistrc
feature query for supports es6-module
which targets only browsers supporting:
<script type="module" src="example.mjs"></script>
The sample code in this project requires polyfills for the following supports es6-module
browsers:
- 0.00 % - Chrome 61
- 0.00 % - Edge 16
- 0.00 % - Firefox 60
- 0.00 % - Opera 48
- 0.00 % - Safari 10.1 (macOS)
- 0.28 % - Safari 10.3 (iOS)
- 0.00 % - Samsung 8.2
Do we still need polyfills for browsers with 0.00% audience? See caniuse-db
GB stats
Note: Adding the query and > 0.1% in GB
to .browserslistrc
would sensibly remove the large KB polyfill overhead as audience numbers drop below 0.1% over time
Output supported browsers from config:
npx browserslist
Typical polyfill imports for this project include:
Supports array methods in:
- Chrome 61
- Opera 48
- Samsung 8.2
[].entries()
[].keys()
[].values()
Supports array methods on CSSRuleList
, DOMTokenList
, HTMLFormElement
etc in:
- Chrome 61
- Edge 16
- Opera 48
- Safari 10.1 (macOS)
- Safari 10.3 (iOS)
- Samsung 8.2
To support:
- Chrome 61
- Edge 16
- Firefox 60
- Opera 48
- Safari 10.1 (macOS)
- Safari 10.3 (iOS)
- Samsung 8.2
Promise.all()
Promise.race()
Promise.reject()
Promise.resolve()
new Promise()
.then()
.catch()
To support:
- Chrome 61
- Edge 16
- Firefox 60
- Opera 48
- Safari 10.1 (macOS)
- Safari 10.3 (iOS)
- Samsung 8.2
''.trimEnd()
''.trimStart()