title: angular 8 loads application assets twice
body: <p>i have a ng 8 application available on (<a href="https://anyteam.work/en/" rel="nofollow noreferrer">https://anyteam.work/en/</a>) if you kindly inspect the network tab, angular making request twice!!! the files are 4mb but since they have been called twice, my page load is almost 9mb!!! and one more thing, when my application was in angular 7, my bundle size was 3mb, after changing to angular 8, bundle size of same code became 3.5mb, i was wondering this 500k extra bundle size in because of new version of framework, or as my yarn logs nags about some packages having incorrect peer dependency to some older versions, the older dependencies gets bundled also? </p>
  
  <p><a href="https://i.stack.imgur.com/FUHsb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FUHsb.png" alt="angular 8 loads application assets twice"></a></p>
  
  <p>the content of index.html is </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="{0}" dir="{1}" data-debug="{2}" data-user-id="{3}"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /&gt;
      &lt;meta content="IE=edge" http-equiv="X-UA-Compatible" /&gt;
      &lt;meta
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
        name="viewport"
      /&gt;
      &lt;link
        data-do-not-remove-me="true"
        href="/assets/bootstrap/bootstrap.{1}.min.css"
        rel="stylesheet"
      /&gt;
      &lt;link
        data-do-not-remove-me="true"
        href="/assets/styles/loader.css"
        rel="stylesheet"
      /&gt;
      &lt;link
        data-do-not-remove-me="true"
        href="/assets/pwa/favicon.ico"
        rel="icon"
        type="image/x-icon"
      /&gt;
      &lt;title&gt;Any Team | achasoft.com&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="app-loading-container" class="waiting-container full-screen"&gt;
        &lt;span class="waiting-spinner"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;app-panel-root&gt;&lt;/app-panel-root&gt;
      &lt;script
        data-do-not-remove-me="true"
        type="text/javascript"
        src="/{0}/dynamics/translates"
      &gt;&lt;/script&gt;
      &lt;script
        data-do-not-remove-me="true"
        type="text/javascript"
        src="/{0}/dynamics/enums"
      &gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>partial content of angular.json </p>
  
  <pre><code>{
        "projectType": "application",
        "schematics": {
          "@schematics/angular:component": {
            "style": "scss"
          }
        },
        "root": "projects/main",
        "sourceRoot": "projects/main/src",
        "prefix": "app-main",
        "architect": {
          "build": {
            "builder": "@angular-devkit/build-angular:browser",
            "options": {
              "outputPath": "../backend/AchaApplication.Web/wwwroot/app/main",
              "index": "projects/main/src/index.html",
              "main": "projects/main/src/main.ts",
              "polyfills": "projects/main/src/polyfills.ts",
              "tsConfig": "projects/main/tsconfig.app.json",
              "assets": [
                "projects/main/src/favicon.ico",
                "projects/main/src/assets"
              ],
              "styles": [
                "projects/main/src/styles.scss"
              ],
              "scripts": []
            },
            "configurations": {
              "production": {
                "fileReplacements": [
                  {
                    "replace": "projects/main/src/environments/environment.ts",
                    "with": "projects/main/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": "5mb",
                    "maximumError": "6mb"
                  },
                  {
                    "type": "anyComponentStyle",
                    "maximumWarning": "6kb",
                    "maximumError": "10kb"
                  }
                ]
              }
            }
          },
          "serve": {
            "builder": "@angular-devkit/build-angular:dev-server",
            "options": {
              "browserTarget": "main:build"
            },
            "configurations": {
              "production": {
                "browserTarget": "main:build:production"
              }
            }
          },
          "extract-i18n": {
            "builder": "@angular-devkit/build-angular:extract-i18n",
            "options": {
              "browserTarget": "main:build"
            }
          },
          "test": {
            "builder": "@angular-devkit/build-angular:karma",
            "options": {
              "main": "projects/main/src/test.ts",
              "polyfills": "projects/main/src/polyfills.ts",
              "tsConfig": "projects/main/tsconfig.spec.json",
              "karmaConfig": "projects/main/karma.conf.js",
              "assets": [
                "projects/main/src/favicon.ico",
                "projects/main/src/assets"
              ],
              "styles": [
                "projects/main/src/styles.scss"
              ],
              "scripts": []
            }
          },
          "lint": {
            "builder": "@angular-devkit/build-angular:tslint",
            "options": {
              "tsConfig": [
                "projects/main/tsconfig.app.json",
                "projects/main/tsconfig.spec.json",
                "projects/main/e2e/tsconfig.json"
              ],
              "exclude": [
                "**/node_modules/**"
              ]
            }
          },
          "e2e": {
            "builder": "@angular-devkit/build-angular:protractor",
            "options": {
              "protractorConfig": "projects/main/e2e/protractor.conf.js",
              "devServerTarget": "main:serve"
            },
            "configurations": {
              "production": {
                "devServerTarget": "main:serve:production"
              }
            }
          }
        }
      }
  </code></pre>