-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
babel-preset-env + babel-polyfill documentation is misleading #1660
Copy link
Copy link
Open
Description
With Babel 6 (and 7) babel-preset-env and babel-polyfill documentations are misleading.
Based on my experimentations with babel-preset-env + babel-polyfill (for Babel 6) here: https://github.com/tkrotoff/babel-preset-env-example
Suggestions to improve babel-preset-env documentation:
- Clearly state that babel-preset-env is not enough alone, you also need babel-polyfill (or manually include the polyfills you want)
- Do not give examples with
last 2 versions: not a good practice
Suggestions to improve babel-polyfill documentation:
- Clearly state here that
import 'babel-polyfill'is the preferred way becauseuseBuiltIns: truewon't work otherwise - Clearly state here that it's
import 'babel-polyfill'OR webpackentry: ['babel-polyfill', './App.js'], not both
Also it should say somewhere there is nothing magic, Babel does not analyse the code to determine the needed polyfills :) i.e it will include Object.assign polyfill even if you don't use Object.assign inside your code: everything is based on targets.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels