Closed
Description
TypeScript Version: 3.7.0-dev.20190912
Search Terms:
resolveJsonModule
Projects must list all files or use an 'include' pattern
Code
tsconfig.json
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"strictNullChecks": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.json"],
"references": []
}
tsconfig.base.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es2017",
"lib": ["es2017"],
"composite": true,
"esModuleInterop": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"sourceMap": true,
"skipLibCheck": true
}
}
Expected behavior:
When resolveJsonModule
is turned on, and json files have been included in the includes
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: