Skip to content

Commit 6a23db4

Browse files
branchseerclaude
andcommitted
feat(config): add static vite config extraction to avoid NAPI for run config
Add a new `vite_static_config` crate that uses oxc_parser to statically extract JSON-serializable fields from vite.config.* files without needing a Node.js runtime. The `VitePlusConfigLoader` now tries static extraction first for the `run` config and falls back to NAPI only when needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 740e7b0 commit 6a23db4

6 files changed

Lines changed: 821 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "9e
186186
vite_install = { path = "crates/vite_install" }
187187
vite_migration = { path = "crates/vite_migration" }
188188
vite_shared = { path = "crates/vite_shared" }
189+
vite_static_config = { path = "crates/vite_static_config" }
189190
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "9e1287e797190ea29793655b239cdaa7a55edd21" }
190191
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "9e1287e797190ea29793655b239cdaa7a55edd21" }
191192
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "9e1287e797190ea29793655b239cdaa7a55edd21" }
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "vite_static_config"
3+
version = "0.0.0"
4+
authors.workspace = true
5+
edition.workspace = true
6+
homepage.workspace = true
7+
license.workspace = true
8+
repository.workspace = true
9+
10+
[dependencies]
11+
oxc = { workspace = true }
12+
oxc_allocator = { workspace = true }
13+
rustc-hash = { workspace = true }
14+
serde_json = { workspace = true }
15+
vite_path = { workspace = true }
16+
17+
[dev-dependencies]
18+
tempfile = { workspace = true }
19+
20+
[lints]
21+
workspace = true

0 commit comments

Comments
 (0)