4 ms·
How hard is it to automate this and what impact on build times does it have?
by moosingin3space 10y ago
How hard is it to automate this and what impact on build times does it have?
- Derander 10y agoIt's not hard to automate with raw gulp or webpack, but it does add a significant amount of time to compilation. It roughly doubled our incremental compile times. My team decided it wasn't worth it, but it's possible that a cleverer person could decrease the overhead.
- moosingin3space 10y agoI ask because I'm debating between trialing TypeScript or Elm for a personal project (I primarily work in Rust and Go on the backend/infrastructure), and iteration times are important when trying to get a frontend UI "just right".
- jsheard 10y agoYou could just use TypeScripts ES6 output directly during development, using a browser that supports ES6 natively, then add Babel to the build chain for public builds that need to work on older browsers.
- moosingin3space 10y agoDo I generally need to use prerelease browsers for ES6 support? Sorry, it's been a long time since I've been on the frontend.
- jsheard 10y agoThe stable versions of Chrome, Firefox and Edge all support ES6 generators. Safari stable doesn't support them yet but the tech preview does. https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- smt88 10y agoIt takes about 20 min. It's very easy to get TS to output ES6 (a single line in a config file). It's very easy to get Babel to output ES5 from ES6. The only thing that might be time-consuming is setting your paths if you don't already have a plan for keeping things separate.