-
Notifications
You must be signed in to change notification settings - Fork 795
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
bug: tsconfig include array triggers warning when path has leading ./ #4667
Comments
Hey @cam-narzt 👋 Thanks for bug report + reproduction case! I took a look at it this morning, and wasn't able to reproduce the error exactly on my end. Following the steps to repro, I:
I do get an error message, but it looks like it's properly listing the 'src' directory in the error message instead of 'app/javascript':
Does it look like I'm missing anything here? |
Ah I forgot to commit one file while I was making the reproduction repo, the head is the stencil config |
Ah, gotcha! Makes sense - I can reproduce this now. Thanks! |
this commit fixes a bug where a user was unable to use relative paths in the `include` property of their `tsconfig.json` file if `srcDir` was also specified. previously, when `tsconfig.json#include` contained a relative path: ``` "include": [ "./app/javascript" ], ``` and `tsconfig.json#srcDir` included the non-relative version of that path: ``` srcDir: 'app/javascript', ``` then you would receive a very confusing error: ``` [ WARN ] tsconfig.json "include" required In order for TypeScript to improve watch performance, it's recommended the "tsconfig.json" file should have the "include" property, with at least the app's "app/javascript" directory listed. For example: "include": ["app/javascript"] ``` closes #4667
@cam-narzt I've created #4676 to fix this - I've created a dev build of Stencil that includes the fix atop of v4.0.4. If you get a moment, can you try installing it and let me know how it goes?
|
That fixed the issue on my end, lgtm. |
this commit fixes a bug where a user was unable to use relative paths in the `include` property of their `tsconfig.json` file if `srcDir` was also specified. previously, when `tsconfig.json#include` contained a relative path: ``` "include": [ "./app/javascript" ], ``` and `tsconfig.json#srcDir` included the non-relative version of that path: ``` srcDir: 'app/javascript', ``` then you would receive a very confusing error: ``` [ WARN ] tsconfig.json "include" required In order for TypeScript to improve watch performance, it's recommended the "tsconfig.json" file should have the "include" property, with at least the app's "app/javascript" directory listed. For example: "include": ["app/javascript"] ``` closes #4667
The fix for this issue went out with today's v4.0.5 release. As such, I'm going to close it out. Should it appear again, please feel free to open a new issue. Thanks! |
Prerequisites
Stencil Version
4.0.4
Current Behavior
if your tsconfig looks like this:
you will get the very confusing warning:
Expected Behavior
paths that are equivalent shouldn't raise this warning
System Info
Steps to Reproduce
clone linked repo
checkout
tsconfig_bug
branchrun
npm i
run
npm run build
Code Reproduction URL
https://github.com/cam-narzt/stencilbug/tree/tsconfig_bug
Additional Information
No response
The text was updated successfully, but these errors were encountered: