Thanks to visit codestin.com
Credit goes to github.com

Skip to content

perf: migrate unplugins to oxc-walker#663

Merged
harlan-zw merged 3 commits into
v3from
chore/migrate-oxc-walker
Feb 24, 2026
Merged

perf: migrate unplugins to oxc-walker#663
harlan-zw merged 3 commits into
v3from
chore/migrate-oxc-walker

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

πŸ”— Linked issue

Related to #620

❓ Type of change

  • πŸ“– Documentation
  • 🐞 Bug fix
  • πŸ‘Œ Enhancement
  • ✨ New feature
  • 🧹 Chore

πŸ“š Description

Replaces legacy AST tooling (estree-walker, unplugin-ast, acorn-loose) with oxc-walker across all unplugin transforms, unifying on a single parser/walker stack.

addons:

  • UseSeoMetaTransform β€” parseSync + walk replaces this.parse() + estree-walker
  • TreeshakeServerComposables β€” parseSync + walk + MagicString replaces unplugin-ast (babel-based)

react/solid-js:

  • Streaming plugins use walk() with function stack context tracking instead of oxc-parser's Visitor pattern

Deps removed: estree-walker, unplugin-ast, @babel/types, @types/estree, acorn-loose
Deps added: oxc-walker (catalog)

@harlan-zw harlan-zw force-pushed the chore/migrate-oxc-walker branch from d4f8855 to 7bae010 Compare February 24, 2026 02:55
Replace legacy AST tooling (estree-walker, unplugin-ast, acorn-loose)
with oxc-walker across addons, react, and solid-js packages.

- addons: UseSeoMetaTransform now uses parseSync + walk instead of
  this.parse() + estree-walker
- addons: TreeshakeServerComposables now uses parseSync + walk +
  MagicString instead of unplugin-ast
- react/solid-js: streaming plugins use walk() instead of Visitor
  pattern with proper function stack context tracking

Drops deps: estree-walker, unplugin-ast, @babel/types, @types/estree,
acorn-loose
@harlan-zw harlan-zw force-pushed the chore/migrate-oxc-walker branch from 7bae010 to b06f768 Compare February 24, 2026 03:07
- Replace `findStaticImports` (mlly) with `parseAndWalk` (oxc-walker) across Vue, React, Solid, Svelte
- Use Vite native `transform.filter` for file extension filtering via `createStreamingPlugin`
- Remove `mlly` from all framework package dependencies and build externals
@harlan-zw harlan-zw changed the title chore: migrate unplugins to oxc-walker perf: migrate unplugins to oxc-walker Feb 24, 2026
…mlly catalog

TS narrowed existingImport to never since it was mutated inside parseAndWalk callback.
Use explicit type assertion to break the narrowing.
@harlan-zw harlan-zw merged commit 35610ec into v3 Feb 24, 2026
1 check passed
@harlan-zw harlan-zw mentioned this pull request Apr 4, 2026
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