-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
.json inputs not allowed outside of rootDir #38015
Comments
This does not repro and does not repro error with latest from master
|
Specifying
|
The issue is not
|
Why does TypeScript need to put the JSON files in the |
.json files are like .js files and will be emitted .. only special casing is they are emitted if the emit would overwrite them |
I see, thanks! Although I find it weird that json files are treated differently than, say, css files. |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
TypeScript Version: Version 3.8.3
Search Terms: json rootDir
Code
Folder structure:
tsconfig:
test.ts:
Expected behavior:
JSON printed to stdout.
Actual behavior:
The error:
src/test.ts:1:19 - error TS6059: File 'repro/data/dummy.json' is not under 'rootDir' 'repro/src'. 'rootDir' is expected to contain all source files.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: