Webpack error, Loading chunk failed : <p>Stack: Webpack 4.16.0, Node8, Vuejs2</p>

<p>I am seeing the below error, whilst serving my Vuejs application.</p>

<pre><code>Error: Loading chunk 4 failed.
(missing: https://myapp.com/ui.chunk.bundle.js)
    at HTMLScriptElement.s (demo:1)
</code></pre>

<p>This error is consistent across builds, the actual file itself is accesible via the URL.</p>

<p>I am using code splitting via <code>import()</code> and the initial app loads fine, but then the flow will break when another chunk is loaded, it can also vary between <code>ui.chunk.bundle.js</code> &amp; <code>vendors~ui.chunk.bundle.js</code>.</p>

<p>When building for production, a new error is shown, but it seems related as also linked to loading modules:</p>

<pre><code>demo:1 TypeError: Cannot read property 'call' of undefined
    at o (demo:1)
    at Object.349 (ui.chunk.bundle.js:1)
    at o (demo:1)
    at o.t (demo:1)
</code></pre>

<p>I have tried upgrading webpack and babel, but am at a loss as to what this could be down to as it was working perfectly fine before.</p>

<p>When running the application on my local machine and not Google App Engine, everything seems fine.</p>

<p><strong>How the app is loaded:</strong>
It is loaded into other website via a script tag, so <code>domainA.com</code> runs the script tag which calls <code>myapp.com/js</code> and the flow begins, i.e the app loads various chunks based on some logic.</p>

<p>When accessing the webpack generated index page bundle at myapp.com everything loads correctly.</p>

<p>Please help!</p>
