Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: replace the tsc TypeScript compiler by swc #175

Closed
wants to merge 10 commits into from

Conversation

bgatellier
Copy link
Contributor

@bgatellier bgatellier commented Aug 21, 2023

🚫 Limitations as of 2023-08-21:

  • d.ts file are not generated
  • prettier is not able to detect the import assertion syntax, so pre-commit fails

Changelog:

  • Replace the tsc dependency by swc
  • Update the npm build script
  • Update the npm watch script
  • Update the npm test script
  • Minify output
  • Output a single file
  • Remove tsconfig files

rush rebuild went from 6.5s to 1.3s (5x faster)
Output file size went from to ()

Closes #174

@bgatellier bgatellier added the enhancement New feature or request label Aug 21, 2023
@bgatellier bgatellier added this to the vNext milestone Aug 21, 2023
@bgatellier bgatellier self-assigned this Aug 21, 2023
@bgatellier bgatellier changed the title Feat/replacetsc swc Feat: replace the tsc TypeScript compiler by swc Aug 21, 2023
@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03% 🎉

Comparison is base (29f4452) 33.70% compared to head (628c870) 33.73%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   33.70%   33.73%   +0.03%     
==========================================
  Files          75       75              
  Lines        2789     2789              
  Branches      159      155       -4     
==========================================
+ Hits          940      941       +1     
- Misses       1690     1693       +3     
+ Partials      159      155       -4     

see 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bgatellier
Copy link
Contributor Author

SWC does not type checking, so we're losing a quality feature here.
As performance gains are small and only related to contribution (application builds) and not usage, moving to SWC is not so relevant

@bgatellier bgatellier closed this Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try to replace the TypeScript compiler for a more efficient alternative
1 participant