<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>


<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>



<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.</strong></p>
<p dir="auto">Hi guys,</p>
<p dir="auto">I'm using Webpack 4 and wanted to split two entry points and avoid duplication. So, I have react and react-dom in both chunks.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="entry: {
        index: ['babel-polyfill', './app/app.jsx'],
        vendor: [
            'react',
            'react-dom'
        ]
    }"><pre class="notranslate">entry: <span class="pl-kos">{</span>
        <span class="pl-c1">index</span>: <span class="pl-kos">[</span><span class="pl-s">'babel-polyfill'</span><span class="pl-kos">,</span> <span class="pl-s">'./app/app.jsx'</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-c1">vendor</span>: <span class="pl-kos">[</span>
            <span class="pl-s">'react'</span><span class="pl-kos">,</span>
            <span class="pl-s">'react-dom'</span>
        <span class="pl-kos">]</span>
    <span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="        splitChunks: {
                cacheGroups: {
                    index: {
                        minChunks: 2,
                        priority: -20,
                        reuseExistingChunk: true
                    },
                    vendor: {
                        test: /[\\/]node_modules[\\/]/,
                        priority: -10
                    }
                }
            }"><pre class="notranslate">        splitChunks: <span class="pl-kos">{</span>
                <span class="pl-c1">cacheGroups</span>: <span class="pl-kos">{</span>
                    <span class="pl-c1">index</span>: <span class="pl-kos">{</span>
                        <span class="pl-c1">minChunks</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span>
                        <span class="pl-c1">priority</span>: <span class="pl-c1">-</span><span class="pl-c1">20</span><span class="pl-kos">,</span>
                        <span class="pl-c1">reuseExistingChunk</span>: <span class="pl-c1">true</span>
                    <span class="pl-kos">}</span><span class="pl-kos">,</span>
                    <span class="pl-c1">vendor</span>: <span class="pl-kos">{</span>
                        <span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span>node_modules<span class="pl-kos">[</span><span class="pl-cce">\\</span>/<span class="pl-kos">]</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span>
                        <span class="pl-c1">priority</span>: <span class="pl-c1">-</span><span class="pl-c1">10</span>
                    <span class="pl-kos">}</span>
                <span class="pl-kos">}</span>
            <span class="pl-kos">}</span></pre></div>
<p dir="auto">This is basically the same problem as <a href="https://github.com/joyent/node/issues/6829" data-hovercard-type="issue" data-hovercard-url="/nodejs/node-v0.x-archive/issues/6829/hovercard">this requireJS issue</a>: "require() loads same module multiple times if case is different". I might even have the same origin.</p>
<p dir="auto">Here's my two cents: I have to js files, both requiring jQuery but using different casing. This results in an increased webpack size. Chrome DevTools show jQuery.js twice in the Source tab:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/7db45af7d1dcbba16f8d2c9f9af89d25ee486ec5ef2b76305e2e6a8d1de287cc/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f373030383933392f323437303330352f32616438393662362d623031302d313165332d396139382d3733323136653439353665382e706e67"><img src="https://camo.githubusercontent.com/7db45af7d1dcbba16f8d2c9f9af89d25ee486ec5ef2b76305e2e6a8d1de287cc/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f373030383933392f323437303330352f32616438393662362d623031302d313165332d396139382d3733323136653439353665382e706e67" alt="image" data-canonical-src="https://f.cloud.github.com/assets/7008939/2470305/2ad896b6-b010-11e3-9a98-73216e4956e8.png" style="max-width: 100%;"></a></p>
<p dir="auto">When I fix the casing, the size is about 90KB smaller and the second entry in DevTools disappear.</p>
<p dir="auto">Is this a "works as designed" thing due to javascript being case sensitive or is it a bug?</p>