<h1 dir="auto">I'm submitting a...</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> bug report</li>
</ul>
<p dir="auto"><strong>Webpack version:</strong><br>
2.1.0-beta.13</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
OSX 10.11.5</p>
<p dir="auto"><strong>Current behavior:</strong><br>
When loaders are defined with <code class="notranslate">-loader</code> (e.g. <code class="notranslate">babel-loader</code>), because the default value of <code class="notranslate">moduleExtensions</code> is <code class="notranslate">-loader</code>, module resolution attempts to find <code class="notranslate">babel-loader-loader</code>, which causes an erroneous <code class="notranslate">npm install</code> with this plugin:</p>
<blockquote>
<p dir="auto"><a href="https://github.com/ericclemmons/npm-install-webpack-plugin">https://github.com/ericclemmons/npm-install-webpack-plugin</a></p>
</blockquote>
<p dir="auto"><strong>Expected/desired behavior:</strong></p>
<p dir="auto">Expected that that this <em>enforces</em> the <code class="notranslate">-loader</code> extension, so that <code class="notranslate">babel</code> becomes <code class="notranslate">babel-loader</code>.  It should noop if <code class="notranslate">/-loader$/</code> matches.</p>
<ul dir="auto">
<li><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.</strong></li>
</ul>
<p dir="auto">I believe this is due to these two files:</p>
<blockquote>
<p dir="auto"><a href="https://github.com/webpack/enhanced-resolve/blob/d154f01b6f74b90f3ac3c5ea6cca89abead5236c/lib/ResolverFactory.js#L164-L169">https://github.com/webpack/enhanced-resolve/blob/d154f01b6f74b90f3ac3c5ea6cca89abead5236c/lib/ResolverFactory.js#L164-L169</a><br>
<a href="https://github.com/webpack/enhanced-resolve/blob/master/lib/ModuleAppendPlugin.js">https://github.com/webpack/enhanced-resolve/blob/master/lib/ModuleAppendPlugin.js</a></p>
</blockquote>
<p dir="auto"><a href="http://typescript.codeplex.com/" rel="nofollow">http://typescript.codeplex.com/</a></p>
<p dir="auto">If this post gets +5 I'll plan to do this...</p>