<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p>
<p dir="auto">Request a feature, even though it migth be there already but I just don't know how to set it up.</p>


<p dir="auto"><strong>What is the current behavior?</strong></p>



<p dir="auto">Basically I have <code class="notranslate">webpack.config.js</code> stored in different directory, not the child or parent, but sibling directory.<br>
I'm using the <code class="notranslate">--config</code> switch to point to it and webpack finds it and reads from it.<br>
However it gives an error when this line is read for example:</p>
<p dir="auto"><code class="notranslate">const CircularDependencyPlugin = require('circular-dependency-plugin');</code></p>
<p dir="auto">Error says that it cannot find CircularDependencyPlugin.<br>
It seems that webpack is looking for the <code class="notranslate">node_modules</code> in the directory where <code class="notranslate">webpack.config.js</code> is found and not in current working directory.<br>
So when I work in app root directory and from it invoke webpack which points to <code class="notranslate">webpack.config.js</code> in sibling directory seems that this other directory is used by webpack to look for the <code class="notranslate">node_modules</code>.<br>
Having duplicate <code class="notranslate">node_modules</code> in sibling directory is not an option.</p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">I would like for webpack to use current working directory for <code class="notranslate">node_modules</code> lookup and do everything there even though I point to another <code class="notranslate">webpack.config.js</code> file in sibling directory with <code class="notranslate">--config</code> switch.<br>
Is there any way to set it up to behave just like in cases when <code class="notranslate">webpack.config.js</code> is stored in current working directory?</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">I have multiple different applications and they all have same file structure. I also have two versions of <code class="notranslate">webpack.config.js</code>, one for development bundling and one for production.<br>
I will be using <code class="notranslate">npm</code> to abstract webpack bundle commands. In <code class="notranslate">package.json</code> I want to have two commands for bundling, in each I plan to use <code class="notranslate">--config</code> switch to point to the prod or dev <code class="notranslate">webpack.config.js</code>.<br>
Right now I have to delete and replace <code class="notranslate">webpack.config.js</code> in current working directory every time I want to switch from development build to production build and vice versa. And I have to do that for every separate application.<br>
What I want to do is <code class="notranslate">cd</code> to root directory of the app I'm working on, each app would have <code class="notranslate">package.json</code> with webpack bundle commands. Those would point to dev and prod <code class="notranslate">webpack.config.js</code> files in sibling directory, not the parent but side by side directory with other apps directories.<br>
This way I could pack for dev or prod without copying config files.<br>
Due to nature of this project, yes <code class="notranslate">webpack.config.js</code> files (dev and prod versions) can be universal for each app.</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">Node.js 6.11.12, webpack 3.4.1, OS win 10 amd64</p>
<p dir="auto"><strong>I'm submitting a bug report</strong></p>
<p dir="auto"><strong>Webpack version:</strong> 2.1.x</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Windows 10</p>
<p dir="auto"><strong>Current behavior:</strong><br>
cannot specify options</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="output.devtoolModuleFilenameTemplate:         &quot;[resource-path]&quot;,
output.devtoolFallbackModuleFilenameTemplate: &quot;[resource-path]?[hash]&quot;
module.noParse: [/\.noparse\./]"><pre class="notranslate"><code class="notranslate">output.devtoolModuleFilenameTemplate:         "[resource-path]",
output.devtoolFallbackModuleFilenameTemplate: "[resource-path]?[hash]"
module.noParse: [/\.noparse\./]
</code></pre></div>
<p dir="auto"><strong>Expected/desired behavior:</strong><br>
Does not pass schema validation.</p>
<p dir="auto">but</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.noParse: /\.noparse\./"><pre class="notranslate"><code class="notranslate">module.noParse: /\.noparse\./
</code></pre></div>
<p dir="auto">passed</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>
<li><strong>What is the expected behavior?</strong><br>
Pass validation</li>
<li><strong>Browser:</strong> all</li>
<li><strong>Language:</strong> all</li>
</ul>