title: Angular 8 and importing Json
body: <p>I have read a few articles stating you can now import json directly since type script 2.9.
  So I have amended my <strong>tsconfig.json</strong> file as follows:</p>
  
  <pre><code>{
    "compileOnSave": false,
    "compilerOptions": {
      "baseUrl": "./",
      "outDir": "./dist/out-tsc",
      "sourceMap": true,
      "declaration": false,
      "downlevelIteration": true,
      "experimentalDecorators": true,
      "module": "esnext",
      "moduleResolution": "node",
      "importHelpers": true,
      "target": "es2015",
      "typeRoots": [
        "node_modules/@types"
      ],
      "lib": [
        "es2018",
        "dom"
      ]
    },
    "angularCompilerOptions": {
      "fullTemplateTypeCheck": true,
      "strictInjectionParameters": true
    },
    "paths": {
      "@data/*": ["src/core/data/*"],
      "@models/*": ["src/core/models/*"],
      "@services/*": ["src/core/*"],
      "@environments/*": ["src/environments/*"]
    },
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true
  }
  </code></pre>
  
  <p>And then I imported the json into my component like this:</p>
  
  <pre><code>import particlesJson from '../../assets/particles.json';
  </code></pre>
  
  <p>It runs fine, but I get an error in the console:</p>
  
  <blockquote>
    <p>ERROR in src/app/profile/login.component.ts(3,27): error TS2732: Cannot find module '../../assets/particles.json'. Consider using '--resolveJsonModule' to import module with '.json' extension</p>
  </blockquote>
  
  <p>How can I stop that error from appearing?</p>