fix(build): point tsc-alias at tsconfig.build.json - #218
Merged
Conversation
Without -p, tsc-alias falls back to tsconfig.json, whose rootDir is "./"
(it also includes tests/ and scripts/). It therefore looked for emitted
files under dist/src/** and matched nothing, while tsc -p
tsconfig.build.json emits to dist/** with rootDir ./src.
The result was a silent no-op: dist/app.js kept raw aliases such as
require("@plugins/env.plugin"), so pnpm start crashed with
MODULE_NOT_FOUND. pnpm dev was unaffected because tsx resolves the
aliases at runtime.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgfZaJS1UU5VVfmMeL2CRT
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 26, 2026
## [1.7.2](v1.7.1...v1.7.2) (2026-08-26) ### Bug Fixes * **build:** point tsc-alias at tsconfig.build.json ([#218](#218)) ([3c11315](3c11315))
|
🎉 This PR is included in version 1.7.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pnpm run buildsucceeded butpnpm run startcrashed immediately:Cause
The build script ran
tsc-aliaswith no-p, so it fell back totsconfig.jsoninstead oftsconfig.build.json. That config hasrootDir: "./"and also includestests/andscripts/, so tsc-alias expected the emitted files underdist/src/**and matched nothing — a silent no-op (0 files affected). Meanwhiletsc -p tsconfig.build.jsonemits todist/**withrootDir: "./src".The compiled output therefore kept the raw path aliases:
Node cannot resolve those, hence
MODULE_NOT_FOUND.pnpm devwas unaffected becausetsxresolves the aliases at runtime.Fix
Verification
rm -rf dist && pnpm run build— tsc-alias now reports119 files were affected!and the output is rewritten to relative paths:pnpm run startboots cleanly: the three purge schedulers initialize, the server listens on port 3000, and the Redis publisher/subscriber connect.🤖 Generated with Claude Code
https://claude.ai/code/session_01GgfZaJS1UU5VVfmMeL2CRT