Skip to content

Commit 2e5b856

Browse files
committed
chore: pass logger instead
1 parent 0180abe commit 2e5b856

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Server {
3939
// this value of ws can be overwritten for tests
4040
this.wsHeartbeatInterval = 30000;
4141

42-
normalizeOptions(this.compiler, this.options);
42+
normalizeOptions(this.compiler, this.options, this.logger);
4343

4444
this.applyDevServerPlugin();
4545

lib/utils/normalizeOptions.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require('graceful-fs');
55
const isAbsoluteUrl = require('is-absolute-url');
66
const getCompilerConfigArray = require('./getCompilerConfigArray');
77

8-
function normalizeOptions(compiler, options) {
8+
function normalizeOptions(compiler, options, logger) {
99
// TODO: improve this to not use .find for compiler watchOptions
1010
const configArr = getCompilerConfigArray(compiler);
1111
const watchOptionsConfig = configArr.find(
@@ -162,9 +162,7 @@ function normalizeOptions(compiler, options) {
162162
let fakeCert;
163163

164164
if (!options.https.key || !options.https.cert) {
165-
fakeCert = getCertificate(
166-
compiler.getInfrastructureLogger('webpack-dev-server')
167-
);
165+
fakeCert = getCertificate(logger);
168166
}
169167

170168
options.https.key = options.https.key || fakeCert;

0 commit comments

Comments
 (0)