Skip to content

fix(tsconfig): support node subpath imports in extends field - #1193

Closed
gefydev wants to merge 1 commit into
oxc-project:mainfrom
gefydev:fix/tsconfig-extends-subpath
Closed

gefydev wants to merge 1 commit into
oxc-project:mainfrom
gefydev:fix/tsconfig-extends-subpath

Conversation

@gefydev

@gefydev gefydev commented May 31, 2026

Copy link
Copy Markdown

Description

This PR fixes an issue where the `tsconfig` resolver fails to resolve Node subpath imports (specifiers starting with `#`) when used in the `extends` field.

Currently, `get_extended_tsconfig_path` falls back to `load_package_self_or_node_modules` for any specifier that does not start with `.` or `/`. This treats the `#` prefix as a literal directory name, leading to an unhandled `TsconfigNotFound` error.

Changes

  • Added a new match arm for `Some(b'#')` in `get_extended_tsconfig_path`.
  • Reused the existing `find_package_json_for_a_package` and `package_imports_resolve` methods to properly look up the closest `package.json` and resolve the subpath alias according to the Node specification.

Related Issues

Ref: rolldown/rolldown#9611

@Boshen

Boshen commented Jun 3, 2026

Copy link
Copy Markdown
Member

closed by #1199

@Boshen Boshen closed this Jun 3, 2026
@gefydev
gefydev deleted the fix/tsconfig-extends-subpath branch June 3, 2026 12:17
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.

2 participants