Skip to content

fix(core): resolve relative dtsOutDir against defining tsconfig directory#373

Merged
mizdra merged 2 commits intomainfrom
fix-dts-out-dir-config-dir
Apr 22, 2026
Merged

fix(core): resolve relative dtsOutDir against defining tsconfig directory#373
mizdra merged 2 commits intomainfrom
fix-dts-out-dir-config-dir

Conversation

@mizdra
Copy link
Copy Markdown
Owner

@mizdra mizdra commented Apr 22, 2026

from: #370 (comment)

Summary

  • Fix dtsOutDir resolution so that relative paths defined in an extended tsconfig are resolved against the directory of the tsconfig that defines them, matching TypeScript's behavior for options like outDir.
  • Previously, dtsOutDir was always resolved relative to the entry tsconfig directory, which produced surprising results when inheriting from another tsconfig in a different directory.
  • Paths starting with ${configDir} continue to resolve relative to the entry (consumer) tsconfig directory.

Test plan

  • vp test passes (190 unit tests, 304 total)
  • New resolves relative paths against the defining tsconfig directory test passes
  • Existing inheritance tests still pass

mizdra and others added 2 commits April 23, 2026 00:41
…tory

Previously, `dtsOutDir` defined in a base tsconfig was resolved relative
to the entry tsconfig directory. Now relative paths are resolved against
the tsconfig file that defines them, matching TypeScript's behavior for
options like `outDir`. Use `${configDir}` to opt into consumer-relative
resolution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mizdra mizdra added the Type: Bug Bug or Bug fixes label Apr 22, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 22, 2026

🦋 Changeset detected

Latest commit: dec0539

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@css-modules-kit/core Patch
@css-modules-kit/codegen Patch
@css-modules-kit/eslint-plugin Patch
@css-modules-kit/stylelint-plugin Patch
@css-modules-kit/ts-plugin Patch
css-modules-kit-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mizdra mizdra merged commit 3da75ab into main Apr 22, 2026
20 checks passed
@mizdra mizdra deleted the fix-dts-out-dir-config-dir branch April 22, 2026 15:47
@github-actions github-actions Bot mentioned this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Bug or Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant