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
Use Sucrase instead of Babel
We are forced to use babel
Use a dedicated plugin instead of using babel.
https://sucrase.io/
https://github.com/alangpierce/sucrase/tree/master/integrations/gulp-plugin
Related: #2593
With Parcel 2's architecture, swapping out the babel plugin for a custom sucrase/swc plugin should be very easy to do.
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
Most helpful comment
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