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


<p dir="auto"><strong>What is the current behavior?</strong><br>
There is no warning if two or more instances of the same plugin are applied.</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong><br>
n/a</p>



<p dir="auto"><strong>What is the expected behavior?</strong><br>
A warning should be emitted for each plugin that is duplicated, featuring the name of the plugin.</p>
<p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong><br>
I noticed <a href="https://github.com/webpack/webpack/pull/6395#issuecomment-360980992" data-hovercard-type="pull_request" data-hovercard-url="/webpack/webpack/pull/6395/hovercard">@ooflorent's comment</a> and figured it probably would be possible to add a dev-time warning to aid in avoiding plugin clashes.</p>
<p dir="auto"><strong>I'm submitting a feature request</strong> (or a <em>won't fix</em> bug but helpful warnings would be nice if you will)</p>
<p dir="auto"><strong>Webpack version:</strong><br>
1.13.2</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Linux</p>
<p dir="auto"><strong>Current behavior:</strong><br>
When loading (e.g.) React¹ as an external dependency while loading an npm package [e.g. <code class="notranslate">material-ui</code>] that requires a React Addon which itself requires React², this React² will be included by webpack and <em>not</em> loaded from the external, while the external (React¹) will be loaded as well.<br>
A Facebook member explains this <a href="https://github.com/facebook/react/issues/6343#issuecomment-201568911" data-hovercard-type="issue" data-hovercard-url="/facebook/react/issues/6343/hovercard">here</a>, they also describe a workaround in that bug report.</p>
<p dir="auto"><em>Please note that this causes not only bloat but can <a href="https://facebook.github.io/react/warnings/refs-must-have-owner.html#multiple-copies-of-react" rel="nofollow">cause a React app to crash</a>.</em></p>
<p dir="auto"><strong>Expected/desired behavior:</strong><br>
As by above statement there doesn't seem to be trivial solution, but webpack should warn the user that they are included a duplicate version.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
It is very hard to find this issue (digging through the bundled code, comparing import numbers) and cause React apps to crash.</p>
<p dir="auto"><strong>Browser:</strong> All, I guess. Tested in Chromium.</p>
<p dir="auto"><strong>Language:</strong> All, I guess. My code is TypeScript, uses React and Material-UI.</p>