title: Angular compiler returns error when using templateUrl: The template specified for component is not a string
body: <p>In my Angular CLI Project when loading template via <code>templateUrl</code> the JIT compiler returns <code>Uncaught Error: The template specified for component IconComponent is not a string</code>, inline <code>template</code> is working fine though.</p>
  
  <p>I'm running a default cli dev build with custom webpack config (<code>@angular-builders/custom-webpack": "^8.1.0</code>).</p>
  
  <p>For every component except <code>app-root</code> the template property in templateMeta is of type <code>Module</code> instead of <code>string</code>.</p>
  
  <p>Dev Tools:
  <img src="https://i.stack.imgur.com/IfTIZ.png" alt="See Image of Dev Tools Log"></p>
  
  <p>icon.component.ts</p>
  
  <pre><code>@Component({
    selector: 'cmp-icon',
    templateUrl: './icon.component.html',
  })
  </code></pre>
  
  <p>icon.component.html</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;span *ngIf="!hasContainer" [ngClass]="'.c-icon'"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Angular CLI Info:</p>
  
  <pre class="lang-sh prettyprint-override"><code>Angular CLI: 8.1.2
  Node: 12.6.0
  OS: darwin x64
  Angular: 8.1.2
  ... animations, cli, common, compiler, compiler-cli, core, forms
  ... language-service, platform-browser, platform-browser-dynamic
  ... router
  
  Package                           Version
  -----------------------------------------------------------
  @angular-devkit/architect         0.801.2
  @angular-devkit/build-angular     0.801.2
  @angular-devkit/build-optimizer   0.801.2
  @angular-devkit/core              8.1.2
  @angular-devkit/schematics        8.1.2
  @schematics/angular               8.1.2
  @schematics/update                0.801.2
  rxjs                              6.5.2
  typescript                        3.4.5
  webpack                           4.36.1
  </code></pre>
  
  <p>angular.json</p>
  
  <pre><code>{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "projects": {
      "fg": {
        "root": "",
        "sourceRoot": "src",
        "projectType": "application",
        "prefix": "cmp",
        "schematics": {
          "@schematics/angular:component": {
            "styleext": "scss"
          }
        },
        "architect": {
          "build": {
            "builder": "@angular-builders/custom-webpack:browser",
            "options": {
              "outputPath": "dist/fg",
              "index": "src/index.html",
              "main": "src/main.ts",
              "polyfills": "src/polyfills.ts",
              "tsConfig": "src/tsconfig.app.json",
              "customWebpackConfig": {
                "path": "./extra-webpack.config.js"
              },
              "indexTransform": "./index-html.transform.js",
              "assets": ["src/assets"],
              "styles": ["src/styles.scss"],
              "scripts": [],
              "preserveSymlinks": true
            },
            "configurations": {
              "production": {
                "fileReplacements": [
                  {
                    "replace": "src/environments/environment.ts",
                    "with": "src/environments/environment.prod.ts"
                  }
                ],
                "optimization": true,
                "outputHashing": "all",
                "sourceMap": false,
                "extractCss": true,
                "namedChunks": false,
                "aot": true,
                "extractLicenses": true,
                "vendorChunk": false,
                "buildOptimizer": true,
                "budgets": [
                  {
                    "type": "initial",
                    "maximumWarning": "2mb",
                    "maximumError": "5mb"
                  }
                ]
              }
            }
          },
          "serve": {
            "builder": "@angular-builders/custom-webpack:dev-server",
            "options": {
              "browserTarget": "fg:build"
            },
            "configurations": {
              "production": {
                "browserTarget": "fg:build:production"
              }
            }
          },
          "extract-i18n": {
            "builder": "@angular-devkit/build-angular:extract-i18n",
            "options": {
              "browserTarget": "fg:build"
            }
          },
          "test": {
            "builder": "@angular-devkit/build-angular:karma",
            "options": {
              "main": "src/test.ts",
              "polyfills": "src/polyfills.ts",
              "tsConfig": "src/tsconfig.spec.json",
              "karmaConfig": "src/karma.conf.js",
              "styles": ["src/styles.scss"],
              "scripts": [],
              "assets": ["src/favicon.ico", "src/assets"]
            }
          },
          "lint": {
            "builder": "@angular-devkit/build-angular:tslint",
            "options": {
              "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
              "exclude": ["**/node_modules/**"]
            }
          }
        }
      },
      "fg-e2e": {
        "root": "e2e/",
        "projectType": "application",
        "prefix": "",
        "architect": {
          "e2e": {
            "builder": "@angular-devkit/build-angular:protractor",
            "options": {
              "protractorConfig": "e2e/protractor.conf.js",
              "devServerTarget": "fg:serve"
            },
            "configurations": {
              "production": {
                "devServerTarget": "fg:serve:production"
              }
            }
          },
          "lint": {
            "builder": "@angular-devkit/build-angular:tslint",
            "options": {
              "tsConfig": "e2e/tsconfig.e2e.json",
              "exclude": ["**/node_modules/**"]
            }
          }
        }
      }
    },
    "defaultProject": "fg"
  }
  </code></pre>
  
  <p>extra-webpack.config.js</p>
  
  <pre><code>module.exports = {
    module: {
      rules: [
        {
          test: /\.snippet.*\.html$/,
          use: ['html-loader'],
        },
      ],
    },
  };
  
  </code></pre>