'internal json import in a library breaks when importing this library from a served app in nx
In my library I'm importing a json file which works correctly when running codes from this library (e.g. storybook, linter), but when I'm importing from this library in an app served by nx I get this error:
Cannot find module './example.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
Do I have to add "resolveJsonModule": true, in my tsconfig.json in the app as well? It feels like something that should be resolved in the library.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
