3 ms·
> even though everything is written in ES6, it's shipped as ES5 and you're saddled with this polyfilled crap This is somewhat mitigated by the use of babel-pre
by lioeters 7y ago
> even though everything is written in ES6, it's shipped as ES5 and you're saddled with this polyfilled crap
This is somewhat mitigated by the use of babel-preset-env and browserslist.
https://github.com/browserslist/browserslist https://github.com/browserslist/browserslist
Where I work, our build tool uses a list that's (very slowly) getting reduced to evergreen browsers. On some projects, a simpler list can be used for little to no polyfills.
> transpiling in Node, which makes no damn sense
A legitimate use case would be for server-rendered apps, where it's advantageous to share code with client-side, namely transpiling module import/export (rather than CommonJS) and JSX. I do enjoy how recent versions of Node.js are embracing modern language features, even pipeline operator. Still, there are situations where transpiling server-side code makes sense.
Another maybe more relevant reason is using TypeScript, which arguably provides a leap in developer experience and code quality, beyond what browsers (or the V8 engine) would implement in the foreseeable future.