Issue 1:
Do you want to request a feature or report a bug?

Request a feature, even though it migth be there already but I just don't know how to set it up.

What is the current behavior?

Basically I have webpack.config.js stored in different directory, not the child or parent, but sibling directory.

I'm using the --config switch to point to it and webpack finds it and reads from it.

However it gives an error when this line is read for example:

const CircularDependencyPlugin = require('circular-dependency-plugin');

Error says that it cannot find CircularDependencyPlugin.

It seems that webpack is looking for the node_modules in the directory where webpack.config.js is found and not in current working directory.

So when I work in app root directory and from it invoke webpack which points to webpack.config.js in sibling directory seems that this other directory is used by webpack to look for the node_modules.

Having duplicate node_modules in sibling directory is not an option.

What is the expected behavior?

I would like for webpack to use current working directory for node_modules lookup and do everything there even though I point to another webpack.config.js file in sibling directory with --config switch.

Is there any way to set it up to behave just like in cases when webpack.config.js is stored in current working directory?

If this is a feature request, what is motivation or use case for changing the behavior?

I have multiple different applications and they all have same file structure. I also have two versions of webpack.config.js, one for development bundling and one for production.

I will be using npm to abstract webpack bundle commands. In package.json I want to have two commands for bundling, in each I plan to use --config switch to point to the prod or dev webpack.config.js.

Right now I have to delete and replace webpack.config.js 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.

What I want to do is cd to root directory of the app I'm working on, each app would have package.json with webpack bundle commands. Those would point to dev and prod webpack.config.js files in sibling directory, not the parent but side by side directory with other apps directories.

This way I could pack for dev or prod without copying config files.

Due to nature of this project, yes webpack.config.js files (dev and prod versions) can be universal for each app.

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Node.js 6.11.12, webpack 3.4.1, OS win 10 amd64

Issue 2:
I'm submitting a bug report

Webpack version: 2.1.x

Please tell us about your environment:

Windows 10

Current behavior:

cannot specify options

output.devtoolModuleFilenameTemplate: "[resource-path]",
output.devtoolFallbackModuleFilenameTemplate: "[resource-path]?[hash]"
module.noParse: [/\.noparse\./]

Expected/desired behavior:

Does not pass schema validation.

but

module.noParse: /\.noparse\./

passed

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.

What is the expected behavior?

Pass validation

Browser: all

Language: all