Commit 8c41adae authored by Stan Hu's avatar Stan Hu

Properly attach middleware to webpack-dev-server

As shown in https://webpack.js.org/configuration/dev-server
middlewares should be added as an object with `name` and `middleware`
elements.
parent 3dbb300d
...@@ -702,7 +702,10 @@ module.exports = { ...@@ -702,7 +702,10 @@ module.exports = {
const incrementalCompilerMiddleware = incrementalCompiler.createMiddleware(devServer); const incrementalCompilerMiddleware = incrementalCompiler.createMiddleware(devServer);
if (incrementalCompilerMiddleware) { if (incrementalCompilerMiddleware) {
middlewares.unshift(incrementalCompilerMiddleware); middlewares.unshift({
name: 'incremental-compiler',
middleware: incrementalCompilerMiddleware,
});
} }
return middlewares; return middlewares;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment