title: Load external script in angular.json's script array from web
body: <p>In the angular.json file we have the section &quot;scripts&quot; (projects -&gt; architect -&gt; scripts)
  In this array I try to load some scripts. The first script works fine, but the https scripts don't. <strong>They are available when I directly open the links in the browser, they also load when I add them at the end of my index.html as <code>&lt;script src=&quot;https://...&gt;</code>, but somehow it doesn't work in the scripts array:</strong></p>
  <pre><code>&quot;scripts&quot;: [
            &quot;node_modules/@webcomponents/custom-elements/src/native-shim.js&quot;,
            &quot;https://my-server.com/polyfills.js&quot;,
            &quot;https://my-server.com/polyfill-webcomp-es5.js&quot;,
            &quot;https://my-server.com/polyfill-webcomp.js&quot;,
            &quot;https://my-server.com/scripts.js&quot;,
            &quot;https://my-server.com/main.js&quot;
          ]
  </code></pre>
  <p><strong>Further info:</strong></p>
  <p>The problem is that when I add them in the index.html as  tags, I get an error that I don't get when I add the local files in the script array. I don't know what the difference is between adding the scripts in index.html or in angular.json, maybe the order in which the scripts load? Anyway I can't add the scripts locally, I have to load them from the extern server at runtime (I only added them locally for testing, but in production mode I need to load them from the server)</p>
  <p>When I add the files locally and load them in the scripts array it works perfectly fine:</p>
  <pre><code>&quot;scripts&quot;: [
            &quot;node_modules/@webcomponents/custom-elements/src/native-shim.js&quot;,
            &quot;src/scripts.js&quot;,
            &quot;src/polyfills.js&quot;,
            &quot;src/polyfill-webcomp.js&quot;,
            &quot;src/polyfill-webcomp-es5.js&quot;,
            &quot;src/main.js&quot;,
          ]
  </code></pre>