Skip to content

CLUE-406 chore: replace ts-loader with swc-loader for ~3x faster builds#2756

Draft
scytacki wants to merge 1 commit intomasterfrom
CLUE-406-swc-loader-faster-builds
Draft

CLUE-406 chore: replace ts-loader with swc-loader for ~3x faster builds#2756
scytacki wants to merge 1 commit intomasterfrom
CLUE-406-swc-loader-faster-builds

Conversation

@scytacki
Copy link
Member

@scytacki scytacki commented Feb 6, 2026

Summary

  • Replace ts-loader with swc-loader (Rust-based transpiler) for ~3x faster dev builds
  • Add ForkTsCheckerWebpackPlugin to run TypeScript type checking in a parallel process
  • Configure ESLintPlugin with lintDirtyModulesOnly in dev mode
  • Retain ts-loader for CODE_COVERAGE builds (Istanbul instrumentation requires it)

Build performance improvement:

Metric Before After Improvement
Dev initial build ~31s ~10s 3x faster
Core file rebuild ~2.2s ~0.7s 3x faster

Test plan

  • Verify npm start works and HMR rebuilds are fast
  • Verify TypeScript errors still appear in the browser overlay
  • Verify ESLint errors still appear in the browser overlay
  • Verify CODE_COVERAGE=true npm start still works (uses ts-loader)
  • Verify npm run build succeeds
  • Verify npm test passes

🤖 Generated with Claude Code

- Use swc-loader (Rust-based) for transpilation instead of ts-loader
- Add ForkTsCheckerWebpackPlugin for parallel type checking
- Configure ESLintPlugin with lintDirtyModulesOnly in dev mode
- Retain ts-loader for CODE_COVERAGE builds (Istanbul instrumentation)
- Add build performance documentation and benchmark script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.75%. Comparing base (2aaec63) to head (2113d5e).

❗ There is a different number of reports uploaded between BASE (2aaec63) and HEAD (2113d5e). Click for more details.

HEAD has 24 uploads less than BASE
Flag BASE (2aaec63) HEAD (2113d5e)
jest 2 1
cypress-smoke 2 1
cypress-regression 15 0
cypress 7 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2756       +/-   ##
===========================================
- Coverage   86.81%   66.75%   -20.06%     
===========================================
  Files         829      824        -5     
  Lines       44549    44526       -23     
  Branches    11462    11460        -2     
===========================================
- Hits        38673    29723     -8950     
- Misses       5527    13767     +8240     
- Partials      349     1036      +687     
Flag Coverage Δ
cypress ?
cypress-regression ?
cypress-smoke 43.89% <ø> (-0.27%) ⬇️
jest 49.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cypress
Copy link

cypress bot commented Feb 6, 2026

collaborative-learning    Run #17660

Run Properties:  status check passed Passed #17660  •  git commit 2113d5e0e3: CLUE-406 chore: replace ts-loader with swc-loader for ~3x faster builds
Project collaborative-learning
Branch Review CLUE-406-swc-loader-faster-builds
Run status status check passed Passed #17660
Run duration 02m 58s
Commit git commit 2113d5e0e3: CLUE-406 chore: replace ts-loader with swc-loader for ~3x faster builds
Committer Scott Cytacki
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant