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:
- Created 4 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top 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 >
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
Would love help if anyone is interested
npm: https://www.npmjs.com/package/parcel-plugin-sucrase repo: https://github.com/digital-eclecticism/parcel-plugin-sucrase
Parcel now uses swc instead of Babel which is also used for the scope hoisting transforms, which wouldn’t be possible with Sucrase.