-
Notifications
You must be signed in to change notification settings - Fork 1
fix: use tsc-alias for path alias compilation #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
package.json (1)
35-35: Consider delegatingtsc-aliasto apostbuildscript for cleaner chaining and clearer failure handlingRunning
tsc && tsc-aliasinline works, but:
- A
postbuildscript keeps the primarybuildstep focused on transpilation while letting NPM automatically runpostbuildif (and only if)tscsucceeds.- It avoids the shell-specific
&&operator, reducing cross-platform quirks (PowerShell, Yarn 2 PNP, etc.).- Makes it easier to add more post-processing steps later (e.g.,
rimraf,cp).Example diff:
"scripts": { - "build": "tsc && tsc-alias", + "build": "tsc", + "postbuild": "tsc-alias",Not critical, but improves maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
package.json(2 hunks)
🔇 Additional comments (1)
package.json (1)
47-47: Verify thattsc-aliasaligns with yourtsconfig.jsonpath mappingsGood call adding the dev dependency. Double-check:
compilerOptions.paths&baseUrlare set; otherwisetsc-aliasis a no-op.outDirandrootDirare correct, or pass--outDir/--resolve-full-pathsflags totsc-alias.- In watch mode (
npm run dev) aliases will still be unresolved; considertsc-alias -wortsx/ts-nodefor dev if you hit runtime module-not-found errors.If everything is configured, no further action needed.
Summary by CodeRabbit