Fix deprecation warning in dev-runner for webpack-dev-server

This commit is contained in:
AkiraFukushima 2022-04-10 11:26:49 +09:00
parent 20e01db64d
commit 3d9840efaa
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
1 changed files with 6 additions and 4 deletions

View File

@ -68,17 +68,19 @@ function startRenderer() {
static: {
directory: path.resolve(__dirname, '../')
},
onBeforeSetupMiddleware: function (devServer) {
devServer.app.use(hotMiddleware)
setupMiddlewares: function (middlewares, devServer) {
middlewares.unshift(hotMiddleware)
devServer.middleware.waitUntilValid(() => {
resolve()
})
}
return middlewares
},
port: 9080
},
compiler
)
server.listen(9080)
server.start()
})
}