title: Angular X - How to change the path for the compiled JavaScript files in index.html
body: <p>I'm using my Angular App inside an Iframe, and I want to be able to change the path for the javascript files inside index.html after doing a build (ng build).</p>
  
  <p>This is the command I use in order to build my Angular App:</p>
  
  <pre><code>npm run env &amp;&amp; ng build --aot --prod --environment=prod
  </code></pre>
  
  <p>After doing it, in my dist folder I have this tree:</p>
  
  <pre><code>index.html
  inline.318b50c57b4eba3d437b.bundle.js
  main.d83bd9b8af8c676f706b.bundle.js
  and etc
  </code></pre>
  
  <p>Looking inside index.html we can see the following:</p>
  
  <pre><code>&lt;body&gt;
  ...
  &lt;script type="text/javascript" src="inline.318b50c57b4eba3d437b.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="polyfills.5a5809ec73e38d8a32d3.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="scripts.7b67fa96a25429619fd6.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="main.d83bd9b8af8c676f706b.bundle.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I want to change the build command somehow, maybe there is a flag I didn't saw or any other method to generate index.html with a different path for the javascript files as the following:</p>
  
  <pre><code>&lt;body&gt;
  ...
  &lt;script type="text/javascript" src="PathBefore/inline.318b50c57b4eba3d437b.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="PathBefore/polyfills.5a5809ec73e38d8a32d3.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="PathBefore/scripts.7b67fa96a25429619fd6.bundle.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="PathBefore/main.d83bd9b8af8c676f706b.bundle.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>