小编Mel*_*how的帖子

resolveJsonModule 在 Angular 10 中不起作用?

我在一个全新的 Angular 10 项目的资产文件夹中有一个基本的 JSON 文件。
Angular CLI:10.0.1 节点:14.5.0 操作系统:win32 x64 TSC 版本 3.9.5。在我的 tsconfig.json 我有

  "compilerOptions": {
    "module": "commonjs",
    "resolveJsonModule": true,
    "esModuleInterop": true
  }
Run Code Online (Sandbox Code Playgroud)

I have restarted vscode multiple times, and tried compiling from the vscode terminal, a powershell window, and a bash terminal, all returning the same message: "Consider using '--resolveJsonModule' to import module with '.json' extension". I have tried compiling with multiple combinations of different options. At this point I'm wondering if I should restart this project …

typescript angular angular10

13
推荐指数
3
解决办法
8205
查看次数

标签 统计

angular ×1

angular10 ×1

typescript ×1