Skip to content

Replace Babel and esbuild with Yuku#40

Closed
hardfist wants to merge 4 commits into
mainfrom
yuku-replace-babel-esbuild
Closed

Replace Babel and esbuild with Yuku#40
hardfist wants to merge 4 commits into
mainfrom
yuku-replace-babel-esbuild

Conversation

@hardfist

@hardfist hardfist commented Jun 17, 2026

Copy link
Copy Markdown

Summary

This is an experimental test to test the perf gain

  • Replace the plugin's Babel/esbuild/es-module-lexer paths with Yuku parser, codegen, and analyzer usage.
  • Keep the existing internal compatibility surface while moving route transforms, export scanning, and route chunk analysis onto Yuku.
  • Add pnpm bench:yuku to compare the previous HEAD implementation with the current Yuku-backed implementation.

Performance

Benchmark command: pnpm bench:yuku

Benchmark: 250 iterations across 24 TSX route samples
Node: v24.16.0

metric              before ms   after ms   speedup
transform              83.92     12.66     6.63x
export scan             2.05      4.43     0.46x
route transform       215.34     28.73     7.49x
route chunks           35.94     12.08     2.98x
total                 337.25     57.89     5.83x

Validation

  • pnpm build
  • pnpm test:core
  • pnpm bench:yuku

@pkg-pr-new

pkg-pr-new Bot commented Jun 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/rsbuild-plugin-react-router@9887c23

commit: 9887c23

@ScriptedAlchemy

Copy link
Copy Markdown
Collaborator

Closing this in favor of #39, which now contains the Yuku parser/codegen work plus the broader route artifact/cache performance optimizations in a single PR.

@chenjiahan

Copy link
Copy Markdown
Member

Is Yuku production ready? It still looks like a very new project

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.

3 participants