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