3 ms·
For those using Babel already or want to use ES6+ on a set of supported browsers: we have started work on https://github.com/babel/babel-preset-env https://gith
by hzoo 10y ago
For those using Babel already or want to use ES6+ on a set of supported browsers: we have started work on https://github.com/babel/babel-preset-env https://github.com/babel/babel-preset-env. Would appreciate more testing!
It allows passing in a set of supported browsers and transpiling what is required using the lowest common denominator env (uses https://github.com/kangax/compat-table https://github.com/kangax/compat-table for data).
// .babelrc with preset options
{
"presets": [
["env", {
"targets": {
"chrome": 52,
"ie": 11,
"browsers": ["last 2 versions", "safari 7"]
}
}]
]
}
If you have questions, ask below (or make an issue)
- epmatsw 10y agoWow, this is really excellent. Definitely will give this a shot!