Code
// webpack.config.js
module.exports = [
{
entry : {
app: './src/app'
},
output: {
path: path.resolve(__dirname, 'dist/')
filename: 'assets/js/app.js',
chunkFilename: `assets/js/${getAssetName('[hash]', '[name]')}.js`
},
devServer: {
hot: true
}
},
{
entry : {
app: './src/app.server'
},
output: {
path: path.resolve(__dirname, 'dist/server')
filename: 'app.js',
chunkFilename: '[name].js',
libraryTarget: 'commonjs2'
},
target: 'node'
}
];
Run
Expected Behavior
Actual Behavior
All added.
For Bugs; How can we reproduce the behavior?
Example edit: https://github.com/webpack/webpack-dev-server/blob/master/lib/util/addDevServerEntrypoints.js#L22
[].concat(webpackOptions).forEach((wpOpt) => {
+ if (wpOpt.target === 'node') return;
if (typeof wpOpt.entry === 'object' && !Array.isArray(wpOpt.entry)) {
Object.keys(wpOpt.entry).forEach((key) => {
wpOpt.entry[key] = devClient.concat(wpOpt.entry[key]);
});
} else if (typeof wpOpt.entry === 'function') {
wpOpt.entry = wpOpt.entry(devClient);
} else {
wpOpt.entry = devClient.concat(wpOpt.entry);
}
});
For Features; What is the motivation and/or use-case for the feature?
server side rendering
Code
Run
Expected Behavior
The client app entry addwebpack/hot/only-dev-serverwebpack/hot/dev-serveretc.Actual Behavior
All added.
For Bugs; How can we reproduce the behavior?
Example edit: https://github.com/webpack/webpack-dev-server/blob/master/lib/util/addDevServerEntrypoints.js#L22
[].concat(webpackOptions).forEach((wpOpt) => { + if (wpOpt.target === 'node') return; if (typeof wpOpt.entry === 'object' && !Array.isArray(wpOpt.entry)) { Object.keys(wpOpt.entry).forEach((key) => { wpOpt.entry[key] = devClient.concat(wpOpt.entry[key]); }); } else if (typeof wpOpt.entry === 'function') { wpOpt.entry = wpOpt.entry(devClient); } else { wpOpt.entry = devClient.concat(wpOpt.entry); } });For Features; What is the motivation and/or use-case for the feature?
server side rendering