在我的库中,我导入了一个 json 文件,该文件在运行来自该库的代码(例如 Storybook、linter)时可以正常工作,但是当我在 nx 提供的应用程序中从此库导入时,我收到此错误:
Cannot find module './example.json'. Consider using '--resolveJsonModule' to import module with '.json' extension.
Run Code Online (Sandbox Code Playgroud)
我是否还必须"resolveJsonModule": true,
在应用程序中添加 tsconfig.json?感觉像是应该在图书馆解决的事情。