Skip to content

Commit f6ef65a

Browse files
committed
chore: backward compatibility
1 parent f004a7e commit f6ef65a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ if (!process.env.WEBPACK_SERVE) {
4040

4141
class Server {
4242
constructor(options = {}, compiler) {
43+
// TODO: remove this after updating serve package
44+
if (options.hooks) {
45+
[options, compiler] = [compiler, options];
46+
}
47+
4348
validate(schema, options, 'webpack Dev Server');
4449

4550
this.compiler = compiler;

0 commit comments

Comments
 (0)