You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accept an explicit tsconfig path through the API, not only TS_NODE_PROJECT / OXC_TSCONFIG_PATH #806
An explicit tsconfig can only be selected through environment variables: init_resolver reads TS_NODE_PROJECT, then OXC_TSCONFIG_PATH (src/lib.rs#L1515-L1516).
That is awkward for a tool that wraps the loader and lets its user pick a tsconfig. Vite+ runs scripts with vpx --tsconfig <path> script.ts:
Setting OXC_TSCONFIG_PATH for the loader also sets it for the user's script and for every process the script spawns. A nested oxnode, or another loader, then inherits a tsconfig chosen for the outer script.
A TS_NODE_PROJECT that the user exported for ts-node takes precedence over OXC_TSCONFIG_PATH, so the wrapper would have to remove it from the environment, which changes what the user's own child processes see.
Proposal
Accept the path through the API, so a loader can pass it without touching process.env. For example:
an option on the OxcTransformer constructor and on createResolve/load (e.g. { tsconfig?: string }); or
a function such as setTsconfigPath(path) that must run before the first transform or resolve, since the resolver and tsconfig source live in a process-wide OnceLock.
The environment variables would keep working as they do now.
Today Vite+ patches the variable name to its own VP_SCRIPT_TSCONFIG.
Activity
feat(vpx): run TypeScript scripts with the vendored oxc-node (#2936)