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.

Faster builds using Sucrase

See original GitHub issue

🙋 feature request

Sucrase is about 20x faster than Babel. Here’s one measurement of how Sucrase compares with other tools on a large TypeScript codebase with 4045 files and 661081 lines of code:

             Time      Speed
Sucrase      2.928s    225752 lines per second
swc          13.782s   47966 lines per second
TypeScript   39.603s   16693 lines per second
Babel        52.598s   12569 lines per second

🤔 Expected Behavior

Use Sucrase instead of Babel

😯 Current Behavior

We are forced to use babel

💁 Possible Solution

Use a dedicated plugin instead of using babel.

💻 Examples

https://sucrase.io/ https://github.com/alangpierce/sucrase/tree/master/integrations/gulp-plugin

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Kenttletoncommented, Jun 26, 2019
0reactions
mischniccommented, Nov 9, 2022

Parcel now uses swc instead of Babel which is also used for the scope hoisting transforms, which wouldn’t be possible with Sucrase.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Sucrase for faster builds · Issue #6077 · vitejs/vite - GitHub
Create an experiment by using sucrase for compilation of node_modules with @rollup/plugin-sucrase and benchmarking it to see results for both ...
Read more >
Sucrase, a Faster Babel for Modern JS Runtimes - InfoQ
The Sucrase JavaScript/TypeScript compiler aims at providing significantly faster development builds than the standard Babel compiler.
Read more >
Sucrase, 20x faster smaller-scoped alternative to Babel
Does anyone have any idea how much performance is being left on the table by writing these compile-to-js compilers in JS?
Read more >
Comparing Babel, Sucrase, and Similar Libraries
The Pros and Cons of Using Sucrase. Pros: Faster development builds. Cons: Sucrase does not check code for errors and should always be...
Read more >
CHEAPEST WAY TO GET MOST POWER WITH SUCROSE ...
You can get a lot of power for cheap with this Sucrose build ! ... Genshin Impact features fast gameplay with best RPG...
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