Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Accept an explicit tsconfig path through the API, not only `TS_NODE_PROJECT` / `OXC_TSCONFIG_PATH`

Closed
#806 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #817 by @Brooooooklyn — merged

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
api, backend

Research direction

Start with src/lib.rs around init_resolver (lines 1515–1516), then trace how the resolver and tsconfig source are initialized and exposed through the API. Compare the constructor and createResolve/load entry points named in the proposal; choose an API that passes the path without changing process.env while preserving environment-variable behavior. Done means callers can select a tsconfig through the API and existing environment-based selection still works.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
252
Forks
10
Avg merge
9h 46m
Merged PRs (30d)
74

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxc-project/oxc-node

All issues in oxc-project/oxc-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.