<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I have a next.js app which uses exclusively static rendering.  I recently upgraded it to 9.2.0 and released it to production.  Everything worked.</p>
<p dir="auto">After several more commits, we started to see our script just not start executing.  That's how it looks.  No console errors, no network errors, but none of the script seems to run.  We have ajax loading spinners that are baked into the static html of the site by the build process, and that's all we see.  The ajax loads never happen.  Apparently we are getting no script running.</p>
<p dir="auto">"yarn dev" / localhost:3000 works fine.  It's only when building production.</p>
<p dir="auto">So I have a specific commit based on 9.2.0 that works, and a subsequent one that does not.  However, nothing about the commit where it broke has anything I would ever suspect to be related to this.  And if I go to our latest commit and revert the one where the break starts, it is <em>still broken</em>.</p>
<p dir="auto">It's as if it has more to do with the quantity of code than what the code is??</p>
<p dir="auto">Taking all our changes but reverting to 9.1.7 resolves the issue.  I tested 9.2.1 and it does NOT resolve the issue.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">My challenge is how to give you a reproducible test case.  I can't share my code obviously and I don't know how to boil this down to something minimal quite yet.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I'd like the benefits of 9.2.x and have my script keep working.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">Not sure these would help</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Win 10</li>
<li>Browser: Brave, Chrome, and IE11.  We originally conflated this with an IE issue we were working on... we don't normally look at IE :)</li>
<li>Version of Next.js: 9.2.0</li>
</ul>
<h2 dir="auto">Additional context</h2>
<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>