title: Build in production mode results in empty page while build in dev mode works perfectly (Angular 8)
body: <p>In Development-mode (APS-WebAPI) the build works perfekt without errors (ng b --watch). When change to production-mode (ng b --aot OR ng b --prod) the page loads without error but results in an empty page. The Index.cshtml would generated by searching the *.js-files in the folder from the Homecontroller. This problem occurs since we upgrade from Angular-6 to Angular-8. </p>
  
  <p>We would like to publish our changes and environment upgrade (Angular-8 &amp; TypeScript 3.4.5). In Dev-mode (ng b --watch) we render the main.js / polyfills.js / runtime.js / styles.css / vendor.js / modules*.js to the Index.cshtml. This works perfectly.</p>
  
  <p><a href="https://i.stack.imgur.com/tJmkC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tJmkC.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/nx5hB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nx5hB.png" alt="enter image description here"></a></p>
  
  <p>When publishing with --aot or --prod we get all files with the ES5 and ES2015. In the same scheme we render that to the Index.cshtml. After loading the page, all files are found but the page is blank without an error. The files are all loaded like in the angular generated index.html</p>
  
  <p><a href="https://i.stack.imgur.com/TmKiY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TmKiY.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/qA7TF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qA7TF.png" alt="enter image description here"></a></p>
  
  <p>We use the following Index.cshtml, it`s generally the same for Dev- and Prod-Mode.</p>
  
  <pre><code>ConfigurationViewModel model = new ConfigurationViewModel();
  var webPath = HttpRuntime.AppDomainAppVirtualPath;
  var localPath = HostingEnvironment.MapPath(webPath);
  var angularPath = Path.Combine(localPath ?? throw new InvalidOperationException(), "Map");
  var angularDirectory = new DirectoryInfo(angularPath);
  </code></pre>
  
  <p><strong>Prod-Mode</strong></p>
  
  <pre><code>model.RuntimeJsEs5 = angularDirectory.GetFiles("runtime-es5*.js").Single().Name;
  model.RuntimeJsEs2015 = angularDirectory.GetFiles("runtime-es2015*.js").Single().Name;
  model.PolyfillsJsEs5 = angularDirectory.GetFiles("polyfills-es5*.js").Single().Name;
  model.PolyfillsJsEs2015 = angularDirectory.GetFiles("polyfills-es2015*.js").Single().Name;
  model.MainJsEs5 = angularDirectory.GetFiles("main-es5*.js").Single().Name;
  model.MainJsEs2015 = angularDirectory.GetFiles("main-es2015*.js").Single().Name;
  model.StylesCss = angularDirectory.GetFiles("styles.css").Single().Name;
  
  
  &lt;head&gt;
  ....
  &lt;link rel="stylesheet" href="@Model.ConfigurationViewModel.StylesCss"&gt;
  ....
  &lt;/head&gt;
  &lt;body&gt;
  ....
  &lt;script type="module" #src="@Model.ConfigurationViewModel.RuntimeJsEs2015"&gt;&lt;/script&gt;
  &lt;script type="module" src="@Model.ConfigurationViewModel.PolyfillsJsEs2015"&gt;&lt;/script&gt;
  &lt;script nomodule src="@Model.ConfigurationViewModel.RuntimeJsEs5"&gt;&lt;/script&gt;
  &lt;script nomodule" src="@Model.ConfigurationViewModel.PolyfillsJsEs5"&gt;&lt;/script&gt;
  &lt;script type="module" src="@Model.ConfigurationViewModel.MainJsEs2015"&gt;&lt;/script&gt;
  &lt;script nomodule src="@Model.ConfigurationViewModel.MainJsEs5"&gt;&lt;/script&gt;
  ....
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>Dev-Mode</strong></p>
  
  <pre><code>model.RuntimeJsEs2015 = angularDirectory.GetFiles("runtime.js").Single().Name;
  model.PolyfillsJsEs2015 = angularDirectory.GetFiles("polyfills.js").Single().Name;
  model.MainJsEs2015 = angularDirectory.GetFiles("main.js").Single().Name;
  model.StylesCss = angularDirectory.GetFiles("styles.css").Single().Name;
  model.VendorJsEs2015 = angularDirectory.GetFiles("vendor.js").Single().Name;
  
  
  &lt;head&gt;
  ....
  &lt;link rel="stylesheet" href="@Model.ConfigurationViewModel.StylesCss"&gt;
  ....
  &lt;/head&gt;
  &lt;body&gt;
  ....
  &lt;script type="module" src="@Model.ConfigurationViewModel.RuntimeJsEs2015"&gt;&lt;/script&gt;
  &lt;script type="module" src="@Model.ConfigurationViewModel.PolyfillsJsEs2015"&gt;&lt;/script&gt;
  &lt;script type="module" src="@Model.ConfigurationViewModel.VendorJsEs2015"&gt;&lt;/script&gt;
  &lt;script type="module" src="@Model.ConfigurationViewModel.MainJsEs2015"&gt;&lt;/script&gt;
  ....
  &lt;/body&gt;
  </code></pre>
  
  <p>If necessary i would post also the angular.json later.</p>