<p dir="auto">What is not entirely clear to me in the "with-redux" example, how would I go about having an action dispatched on server render, that consists of thunks that fetch data from some api?</p>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">If a module used in a polyfill becomes a separate chunk, any page that doesn't import the same module will break in production, because the chunk is added to main.js webpack dependencies but isn't added as a script tag.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">I've created a repo which reproduces the bug: <a href="https://github.com/jmswrnr/next-9.2.0-chunk-bug">https://github.com/jmswrnr/next-9.2.0-chunk-bug</a></p>
<p dir="auto">The bug only occurs in a production build, so: <code class="notranslate">npm run build</code> and <code class="notranslate">npm run start</code></p>
<ul dir="auto">
<li><a href="http://localhost:3000/" rel="nofollow">http://localhost:3000/</a> - Simple page - <strong>fails mount</strong></li>
<li><a href="http://localhost:3000/dynamic" rel="nofollow">http://localhost:3000/dynamic</a> - Dynamic import with <code class="notranslate">{ ssr: false }</code> - <strong>fails mount</strong></li>
<li><a href="http://localhost:3000/import" rel="nofollow">http://localhost:3000/import</a> - Import polyfill dependency - <strong>successfully mounts</strong></li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">All pages should trigger <code class="notranslate">useEffect</code> and display <code class="notranslate">Mounted: true</code></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows</li>
<li>Browser: chrome</li>
<li>Version of Next.js: <strong>9.2.0</strong> and <strong>9.2.1-canary.2</strong></li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Using polyfill method from example: <a href="https://github.com/zeit/next.js/blob/master/examples/with-polyfills/next.config.js">https://github.com/zeit/next.js/blob/master/examples/with-polyfills/next.config.js</a></p>