Skip to content

Commit

Permalink
fix: deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jul 24, 2021
1 parent cce64d8 commit 4be5d8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ class Server {
constructor(options = {}, compiler) {
// TODO: remove this after plugin support is published
if (options.hooks) {
process.emitWarning(
"Using 'compiler' as the first argument is deprecated. Please use 'options' as the first argument and 'compiler' as the second argument.",
"DeprecationWarning",
"DEP_WEBPACK_DEV_SERVER_API"
);
[options, compiler] = [compiler, options];
}

Expand Down

0 comments on commit 4be5d8d

Please sign in to comment.