From 7287e0011ee21cb6d827c979b4cff2a44bc2ee6b Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Wed, 1 Jun 2022 13:12:30 +0200 Subject: [PATCH] Fix webpack deprecation warnings in the dev-runner (#2282) --- _scripts/dev-runner.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_scripts/dev-runner.js b/_scripts/dev-runner.js index 2e4afab3..c48daa56 100644 --- a/_scripts/dev-runner.js +++ b/_scripts/dev-runner.js @@ -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()