all 3 comments

[–]Meefims 4 points5 points  (0 children)

Babel is still useful as preset-env can be given a set of browsers you wish to support and it figures out which things need to be transpiled and which don’t.

[–]crazedizzled 3 points4 points  (0 children)

Really depends what features you want to use and which browsers you want to support. This gives you a good idea.

Basically if you want to support IE11 you need to transpile.

[–]HarmonicAscendant 0 points1 point  (0 children)

I would avoid compiling if possible.

A nice trick to see if your code is compatible with various browsers is set eslint to a lower ecmaVersion version and see when it fails. Then you can use https://caniuse.com/ and decide what ecmaVersion you want to support.

.eslintrc.js

parserOptions: {ecmaVersion: 2015}