Skip to content

Commit

Permalink
refactor: update webpack-dev-server usage (#2853)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jul 24, 2021
1 parent 53622dc commit d9d4c37
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/serve/src/index.ts
Expand Up @@ -324,7 +324,14 @@ class ServeCommand {
}

try {
const server = new DevServer(compiler, devServerOptions);
let server;

// TODO: remove after dropping webpack-dev-server@v3
if (isDevServer4) {
server = new DevServer(devServerOptions, compiler);
} else {
server = new DevServer(compiler, devServerOptions);
}

server.listen(
devServerOptions.port,
Expand Down

0 comments on commit d9d4c37

Please sign in to comment.