typescript how to mode json files when compile code example
Example 1: typescript how to mode json files when compile
{
"compilerOptions": {
"resolveJsonModule": true,
},
"include": [
"*/src/**/package.json"
]
}
Example 2: tsconfig.json not generated
$ tsc --init
Example 3: typescript compiler doesn't add json file
// add the underneath code in tsconfig.json, now json file will be imported
"resolveJsonModule": true