Fix webpack deprecation warnings in the dev-runner (#2282)

This commit is contained in:
absidue 2022-06-01 13:12:30 +02:00 committed by GitHub
parent 31bb187bbd
commit 7287e0011e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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()