question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile CLI instead of shipping with babel runtime

See original GitHub issue

It’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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
grabboucommented, Jul 31, 2017

Unfortunately, that decision was a tradeoff we have made in order to transpile only required amount of code. That’s why we use babel-env to 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.

0reactions
thymikeecommented, Aug 1, 2017

There is a difference, which gets marginal after babel-register cache gets warm. Nevertheless worth exploring in near future

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found