I’m submitting a feature request
Webpack version:
2.x
Please tell us about your environment:
OSX 10.x
Current behavior:
Currently, a Multicompiler instance with a different output.path
specified for each config will boil the outputPath
property down to a “common” path. I’m referring to this block of code
Lines 51 to 63
in
547295c
. This breaks WDS filename resolution.
Expected/desired behavior:
WDS should serve resources from both paths or at least offer the ability to choose the first/preferred output.path when constructing the filename. I need to be able to output my files to separate (not necessarily nested) directories without breaking resolution.
- What is the motivation / use case for changing the behavior?
In my setup, I am trying to build two separate apps in parallel and I need to be able to share resources between the two, including async modules. Consider the following config:
module.exports = [
{
context: __dirname,
entry: "./app.js",
output: {
filename: "app.js",
path: path.resolve(__dirname, './app/dist'),
publicPath: '/static/javascript/dist/'
},
...
},
{
context: __dirname,
entry: "./widget.js",
output: {
filename: "widget.js",
path: path.resolve(__dirname, './widget/dist'),
publicPath: '/widget/dist/'
},
...
}
]
Moved to WDS, see webpack/webpack-dev-server#641