Answers for "Consider using '--resolveJsonModule' to import module with '.json' extension.ts(2732)"

2

Consider using '--resolveJsonModule

add "resolveJsonModule": true key in tsconfig.json

{
  "compilerOptions": {
    "target": "es2015",
    "module": "commonjs",
    "strict": true,
    "moduleResolution": "node",
    "resolveJsonModule": true
  }
}
Posted by: Guest on January-20-2021
0

typescript read json file

"resolveJsonModule": true,
"esModuleInterop": true,
Posted by: Guest on December-18-2020
0

--resolveJsonModule

declare module "*.json" {
  const value: any;
  export default value;
}
Posted by: Guest on November-21-2020

Code answers related to "Consider using '--resolveJsonModule' to import module with '.json' extension.ts(2732)"

Code answers related to "Javascript"

Browse Popular Code Answers by Language