Fix webpack deprecation warnings in the dev-runner (#2282)
This commit is contained in:
parent
31bb187bbd
commit
7287e0011e
|
@ -115,7 +115,7 @@ function startRenderer(callback) {
|
|||
console.log(`\nWatching file changes for ${name} script...`)
|
||||
})
|
||||
|
||||
const server = new WebpackDevServer(compiler, {
|
||||
const server = new WebpackDevServer({
|
||||
static: {
|
||||
directory: path.join(process.cwd(), 'static'),
|
||||
watch: {
|
||||
|
@ -126,9 +126,9 @@ function startRenderer(callback) {
|
|||
}
|
||||
},
|
||||
port
|
||||
})
|
||||
}, compiler)
|
||||
|
||||
server.listen(port, '', err => {
|
||||
server.startCallback(err => {
|
||||
if (err) console.error(err)
|
||||
|
||||
callback()
|
||||
|
|
Loading…
Reference in New Issue