<h1 dir="auto">Examples bug report</h1>
<h2 dir="auto">Example name</h2>
<p dir="auto">with-ant-design</p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Antd v4 (alpha) builds should include only actually used icons. But in <code class="notranslate">with-ant-design</code> example all 1Mb of icons are bundled.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>Download and unpack two attached archives. Both contain same example but one with nextjs and one with create-react-app</li>
<li>Run <code class="notranslate">npm i</code> in both examples</li>
<li>Run <code class="notranslate">npm run stats</code> in both examples</li>
<li>See at <code class="notranslate">icons-svg</code> size inside <code class="notranslate">@and-design</code>. With <code class="notranslate">create react app</code> it will be about 9Kb. With nextjs it will be about 800Kb.</li>
</ol>
<p dir="auto"><a href="https://github.com/zeit/next.js/files/3747031/cra-antico4.zip">cra-antico4.zip</a><br>
<a href="https://github.com/zeit/next.js/files/3747032/next-antico4.zip">next-antico4.zip</a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Same <code class="notranslate">antd</code> snippets should have approximately same budle size with nextjs and create-react-app</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">With next<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1289725/67149460-80315180-f2bc-11e9-9929-50c0bda9b319.png"><img src="https://user-images.githubusercontent.com/1289725/67149460-80315180-f2bc-11e9-9929-50c0bda9b319.png" alt="next" style="max-width: 100%;"></a></p>
<p dir="auto">With cra<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1289725/67149468-8cb5aa00-f2bc-11e9-8793-c8740ef81edc.png"><img src="https://user-images.githubusercontent.com/1289725/67149468-8cb5aa00-f2bc-11e9-8793-c8740ef81edc.png" alt="cra" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: MacOS</li>
<li>Version of Next.js: 9.1.1</li>
</ul>
<h2 dir="auto">Code to reproduce</h2>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">Importing react-dom in a page or in one of its dependent component will cause react-dom.production.min.js to be included in the page bundle, adding about 32K gzipped size to a page.</p>
<p dir="auto">This is pretty common, examples:</p>
<ul dir="auto">
<li>ReactDOM.createPortal</li>
<li><code class="notranslate">react-transition-group</code> also imports <code class="notranslate">react-dom</code></li>
</ul>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p>
<ol dir="auto">
<li>Go to 'pages/any-page.js'</li>
<li>Add <code class="notranslate">import ReactDOM from 'react-dom';</code></li>
<li>In the render function, do <code class="notranslate">console.log(ReactDOM)</code>. Just to use that dependency.</li>
<li>Production build the project and inspect the bundle size</li>
</ol>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">react-dom should just be in the common bundle, not included again here.<br>
This does not happen with Next 8.</p>
<h2 dir="auto">Screenshots</h2>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Version of Next.js: 9.0.1</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Add any other context about the problem here.</p>