Skip to content

Commit 1a2ba36

Browse files
authored
docs: add Node.js API update in migration guide (#3561)
1 parent fa8c228 commit 1a2ba36

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

migration-v4.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,3 +545,21 @@ There are a lot of other bug fixes.
545545
```
546546

547547
IE8 is not supported, sorry
548+
549+
- Change in **Node.js API**:
550+
551+
- If you're using dev-server through the Node.js API, the options in devServer will be ignored. Pass the options as a first parameter instead:
552+
553+
v3:
554+
555+
```js
556+
new WebpackDevServer(compiler, {...})
557+
```
558+
559+
v4:
560+
561+
```js
562+
new WebpackDevServer({...}, compiler)
563+
```
564+
565+
- [See here](https://github.com/webpack/webpack-dev-server/tree/master/examples/api/simple) for an example of how to use `webpack-dev-server` through the Node.js API.

0 commit comments

Comments
 (0)