<p dir="auto">Flow now has <a href="https://medium.com/flow-type/even-better-support-for-react-in-flow-25b0a3485627" rel="nofollow">better support for React</a>. We should upgrade the <code class="notranslate">with-flow</code> example to use the new version of flow.</p>
<p dir="auto">Also, I don't know much about adding flow type support to libraries, but it doesn't seem like Next JS has flow types built in... would this be something worth adding?</p>

<ul dir="auto">
<li>[ x] I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">In <code class="notranslate">examples/with-flow/components/layout.js</code>, we can change the children prop to be a required property, and change the value to React.Node. There are likely other changes that could be made - we can run flow-upgrade as described <a href="https://medium.com/flow-type/even-better-support-for-react-in-flow-25b0a3485627" rel="nofollow">here</a> to see what changes need to be made.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto"><code class="notranslate">with-flow</code> example uses old flow version.</p>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Page open from Link not use assetPrefix to load chunked js when using granularChunks</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<p dir="auto">Let's say we have a site with <a href="http://www.example.com" rel="nofollow">www.example.com</a></p>
<ol dir="auto">
<li>add granularChunks in next.config.js</li>
<li>set an assetPrefix in next.config.js, like static.example.com</li>
<li>build and run in production mode</li>
<li>click link implemented by  (e.g. <code class="notranslate">&lt;Link href={{pathname: '/index'}} as="/"&gt;link&lt;/Link&gt;</code>)</li>
<li>index.js will load from static.example.com and other js will load from <a href="http://www.example.com" rel="nofollow">www.example.com</a></li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">All js should be loaded from static.example.com</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: [Linux]</li>
<li>Browser (if applies) [chrome]</li>
<li>Version of Next.js: [9.1.1]</li>
</ul>