Answers for "typescript resovle module with exports in json"

5

Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension

add to tsconfig.json

{
	...
    "resolveJsonModule": true
  }
}
Posted by: Guest on July-30-2020
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

Code answers related to "typescript resovle module with exports in json"

Code answers related to "Javascript"

Browse Popular Code Answers by Language