Parcel: Faster builds using Sucrase

Created on 24 Jun 2019  路  3Comments  路  Source: parcel-bundler/parcel

馃檵 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

Performance Feature babel

Most helpful comment

All 3 comments

Related: #2593

With Parcel 2's architecture, swapping out the babel plugin for a custom sucrase/swc plugin should be very easy to do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Niggler picture Niggler  路  3Comments

devongovett picture devongovett  路  3Comments

davidnagli picture davidnagli  路  3Comments

will-stone picture will-stone  路  3Comments

adamreisnz picture adamreisnz  路  3Comments