-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix typescript compiler watch path inconsistency #5155
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |
| "noImplicitReturns": true, | ||
| "noUnusedLocals": false, | ||
| "resolveJsonModule": true, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious about the implications of removing For instance, would this change how TypeScript resolves relative imports or affect the structure of declaration files if they were to be generated?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see how it would affect ts module resolution. There are two (Plus, I think it's a better practice and the original |
||
| "rootDir": ".", | ||
| "skipLibCheck": true, | ||
| "sourceMap": true, | ||
| "strict": true, | ||
|
|
||
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.
Is changing the working directory the most maintainable approach here? I'm wondering if there might be alternative solutions that could achieve the same result without requiring the script to
cd ...For example:
--rootDirCLI flag instead?includepaths in tsconfig.json work?baseUrlcompiler option?The current approach works, but I'm curious if you considered these alternatives and what led to choosing this specific solution?
Uh oh!
There was an error while loading. Please reload this page.
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.
This is actually the only change I managed to come up with that can be minimal in the command itself.
Changing the
includepaths orbaseUrldoesn't affect error reporting. The--rootDironly works with an absolute path (which isn't viable).Only other alternative I could think of was to write a script instead of a one liner, which is even uglier.