You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do I need to do that even I have --resolveJsonModule on?
If a glob pattern doesn’t include a file extension, then only files with supported extensions are included (e.g. .ts, .tsx, and .d.ts by default, with .js and .jsx if allowJs is set to true).
In the document of includes. I think .json should be included too when resolveJsonModule is on.
TypeScript Version: 3.7.0-dev.20190912
Search Terms:
resolveJsonModule
Projects must list all files or use an 'include' pattern
Code
tsconfig.json
tsconfig.base.json
Expected behavior:
When
resolveJsonModule
is turned on, and json files have been included in theincludes
array, I should be able to import json files with no trouble.Actual behavior:
When I use the above tsconfig options, and include a json file, I get the following error:
Related Issues:
#31181
The text was updated successfully, but these errors were encountered: