Compile CLI instead of shipping with babel runtime
See original GitHub issueIt’s a feature
Current Behavior
Haul CLI is shipping with babel-register compiling its code, therefore its boot time increases a lot
Expected Behavior
We can compile CLI code to specified target (e.g. Node 4) with babel and get rid of the slow runtime.
cc @zamotany
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Babel CLI
Babel comes with a built-in CLI which can be used to compile files from the command line.
Read more >Publish as modules (instead of compiling to cjs) · Issue #11701
As a related topic, has babel considered bundling its internal dependencies? For example, @babel/core is currently shipped as many individual ...
Read more >How do I get Babel 6 to compile to ES5 javascript?
For example, if you use the es2015 preset, this will compile ES6 code to ES5-compatible code. ... First, as in the docs, you...
Read more >@babel/plugin-transform-runtime | Yarn - Package Manager
The compiler for writing next generation JavaScript. Gitpod ready-to-code.
Read more >babel/plugin-proposal-decorators - NPM Package Versions
Compile class and object decorators to ES5. Version: 7.18.2 was published by ... babel-cli , babel-helpers , babel-plugin-proposal-class-properties ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Unfortunately, that decision was a tradeoff we have made in order to transpile only required amount of code. That’s why we use
babel-envto detect what is supported and use it instead.In reality, there’s minimum amount of things we transpile on Node 6 and above - no need to include regenerator runtime etc.
There is a difference, which gets marginal after
babel-registercache gets warm. Nevertheless worth exploring in near future