Skip to content

Commit b97dc5e

Browse files
joelfaceshellscape
authored andcommitted
Only load bonjour when needed (#958)
Bonjour doesn't currently work on Windows 10's Bash, so let's not load it if we don't have to.
1 parent e5b6202 commit b97dc5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/webpack-dev-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const net = require("net");
88
const portfinder = require("portfinder");
99
const addDevServerEntrypoints = require("../lib/util/addDevServerEntrypoints");
1010
const createDomain = require("../lib/util/createDomain");
11-
const bonjour = require("bonjour")();
1211

1312
// Local version replaces global one
1413
try {
@@ -455,6 +454,7 @@ function reportReadiness(uri, options) {
455454
}
456455

457456
function broadcastZeroconf(options) {
457+
const bonjour = require("bonjour")();
458458
bonjour.publish({
459459
name: "Webpack Dev Server",
460460
port: options.port,

0 commit comments

Comments
 (0)