Using require ('babel / register') against forwarding code before running

Are there any performance advantages over the latter over the former? When I tested this myself, the time it took for one of my projects to load an already translated one was much shorter than when it used babel / register. Apart from the launch time, I'm not quite sure what I would write to compare the two. Does anyone know if Babel invoice only adds from babel / register code that translates the code when it works, or slowly, no matter what you do?

+5
source share
1 answer

You are correct in that it affects the launch time (it will be drastic, depending on how big your project is). As for the actual runtime, it should make exactly 0 difference if there is no error in Node itself (which, unfortunately, is unlikely to be fixed because it is outdated).

+2
source

All Articles