javascript-boilerplate icon indicating copy to clipboard operation
javascript-boilerplate copied to clipboard

[RFR] Node 7 with babel instead of reify

Open djhi opened this issue 9 years ago • 4 comments

  • [x] Upgraded to node 7.2.1
  • [x] Updated most dependencies
  • [x] Ditch reify and async-to-gen in favor of babel which is fast too when correctly configured
  • [x] Use babel-preset-env

djhi avatar Oct 28 '16 15:10 djhi

NOTE: there's one downside to using this preset with node. The preset has currently no way to check for node flags such as --harmony. This prevent us to use node own implementation of async/await for instance.

djhi avatar Dec 19 '16 08:12 djhi

We need to estimate the boot time difference for a large app. The boilerplate is too small to be representative. In other projects, we are REALLY bothered by transpilation of the Node code as it slows everything down.

Also, I didn't quite understand the downside you added. Can you elaborate?

fzaninotto avatar Dec 20 '16 09:12 fzaninotto

async/await is not supported on node 7 without the --harmony flag.

The babel-preset-env is configured to "patch" the current version of node without any flags. It cannot be configured to not transform async/await when we use the --harmony flag.

djhi avatar Dec 20 '16 10:12 djhi

About the boot time, I'm quite confident it will be reasonable as the preset will only load the transforms needed for the current node version and node 7 already supports most of es6 features.

djhi avatar Dec 20 '16 10:12 djhi