<p dir="auto">Receive following error when running Webpack.  This has been working forever, but for some reason, it is now a problem</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in ./index.js
Module build failed: Error: Final loader didn't return a Buffer or String
    at DependenciesBlock.onModuleBuild (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:299:42)
    at nextLoader (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
    at /Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at runSyncOrAsync (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:160:12)
    at nextLoader (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at Object.context.callback (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at Object.module.exports (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/babel-loader/index.js:89:8)"><pre class="notranslate"><code class="notranslate">ERROR in ./index.js
Module build failed: Error: Final loader didn't return a Buffer or String
    at DependenciesBlock.onModuleBuild (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:299:42)
    at nextLoader (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
    at /Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at runSyncOrAsync (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:160:12)
    at nextLoader (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:290:3)
    at /Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at Object.context.callback (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at Object.module.exports (/Users/mikee/Documents/Projects/dev/angular/angular-sandbox/node_modules/babel-loader/index.js:89:8)
</code></pre></div>
<h2 dir="auto">Feature request</h2>
<p dir="auto">Hi currently In our projects, we plan to do Front End Micro, divide an App to multiple repositories.</p>
<ul dir="auto">
<li>
<p dir="auto">Repo 1: App1</p>
</li>
<li>
<p dir="auto">Repo 2: App2</p>
</li>
<li>
<p dir="auto">Repo 3: App3</p>
</li>
<li>
<p dir="auto">Repo 4: A Shell</p>
</li>
<li>
<p dir="auto">When user navigate to /app1 we will get the script of App1 storing in CDN for example: <code class="notranslate">http://cdn.company/app1,bundle.js</code>. It looks like a <a href="https://webpack.js.org/guides/lazy-loading/" rel="nofollow">Lazy Load Pattern</a></p>
</li>
<li>
<p dir="auto">Can we support the import('<a href="http://cdn.company/app1.bundle.js" rel="nofollow">http://cdn.company/app1.bundle.js</a>') at runtime ?</p>
</li>
</ul>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<ul dir="auto">
<li>It should map the module export from prebuilt bundle at runtime</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import('http://cdn.company/app1.bundle.js').then(module =&gt; {
   this.setState({
       loadedComponent: module.default
   })
});"><pre class="notranslate"><span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">'http://cdn.company/app1.bundle.js'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-smi">module</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
   <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
       <span class="pl-c1">loadedComponent</span>: <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">default</span>
   <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<ul dir="auto">
<li>Front End Micro Architecture</li>
</ul>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<ul dir="auto">
<li>Make it simple like</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import('http://cdn.company/app1,bundle.js').then(module =&gt; {
   this.setState({
       loadedComponent: module.default
   })
});"><pre class="notranslate"><span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">'http://cdn.company/app1,bundle.js'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-smi">module</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
   <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
       <span class="pl-c1">loadedComponent</span>: <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">default</span>
   <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
yes but don't know how to do it 😄</p>