title: Third-party lib within the UI5 app is only loaded after a refresh
body: <p>I'm trying to implement the ZXing barcode scanner library inside my UI5 project. For this I'm following the following tutorial: <a href="https://blogs.sap.com/2021/02/01/native-js-zxing-scanner-in-sapui5/" rel="nofollow noreferrer">https://blogs.sap.com/2021/02/01/native-js-zxing-scanner-in-sapui5/</a>.</p>
  <p>So far it works pretty well. Now I've discovered that the external library doesn't load at the first app opening. So if I open the UI5 lib in incognito mode, the library isn't loaded and I get the following error:</p>
  <blockquote>
  <p>Can't find variable: ZXing</p>
  </blockquote>
  <p>After an additional page reload the lib is successfully loaded and works.</p>
  <p>The resources section inside my <code>mainfest.json</code>:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;resources&quot;: {
    &quot;css&quot;: [
      {
        &quot;uri&quot;: &quot;css/style.css&quot;
      }
    ],
    &quot;js&quot;: [
      {
        &quot;uri&quot;: &quot;libs/zxing.min.js&quot;
      }
    ]
  }
  </code></pre>
  <p>I'm then using the <code>ZXing</code> inside the custom control under &quot;webapp/controls/BarcodeScanner&quot; (as in the tutorial stated) and I have annotated the file with <code>/* global ZXing:true */</code>.</p>
  <p>Then inside the <code>Master.controller.js#init</code>, I initialize the scanner:</p>
  <pre class="lang-js prettyprint-override"><code>this.oScanner = new BarcodeScanner({
    valueScanned: [this.onScanned, this],
    decoderKey: 'text',
  });
  </code></pre>
  <p>I'm completely lost. Why doesn't the library get loaded at the first page view? But from the first refresh on the library works without problems. It's just the first load. That's such a dumb problem and I can't get the solution for.</p>