Commit 796fa30
fix(napi): keep vite_task_client_napi type-defs out of consumer bindings
This crate is embedded as a cdylib artifact dependency of `vite_task`.
napi-derive's `type-def` feature is force-enabled by feature unification with
consumers that need it, so it would otherwise write this crate's `#[napi]`
items (RunnerClient/load) into the consumer's shared NAPI_TYPE_DEF_TMP_FOLDER,
which @napi-rs/cli sweeps into the consumer's generated binding as dead exports
(the symbols live in the separately-loaded addon, not the consumer's .node).
build.rs redirects this crate's type-def emission to an isolated sink and prunes
any stale entry a pre-redirect build left in the consumer's (reused) folder. The
public JS surface is the hand-written @voidzero-dev/vite-task-client package, so
these generated defs are never needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 6e634c6 commit 796fa30
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
5 | 37 | | |
0 commit comments