Skip to content

Commit 4be5d8d

Browse files
committed
fix: deprecation warning
1 parent cce64d8 commit 4be5d8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Server.js

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class Server {
1919
constructor(options = {}, compiler) {
2020
// TODO: remove this after plugin support is published
2121
if (options.hooks) {
22+
process.emitWarning(
23+
"Using 'compiler' as the first argument is deprecated. Please use 'options' as the first argument and 'compiler' as the second argument.",
24+
"DeprecationWarning",
25+
"DEP_WEBPACK_DEV_SERVER_API"
26+
);
2227
[options, compiler] = [compiler, options];
2328
}
2429

0 commit comments

Comments
 (0)