Skip to content

Commit

Permalink
Only load bonjour when needed (#958)
Browse files Browse the repository at this point in the history
Bonjour doesn't currently work on Windows 10's Bash, so let's not load
it if we don't have to.
  • Loading branch information
joelface authored and shellscape committed Jul 10, 2017
1 parent e5b6202 commit b97dc5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const net = require("net");
const portfinder = require("portfinder");
const addDevServerEntrypoints = require("../lib/util/addDevServerEntrypoints");
const createDomain = require("../lib/util/createDomain");
const bonjour = require("bonjour")();

// Local version replaces global one
try {
Expand Down Expand Up @@ -455,6 +454,7 @@ function reportReadiness(uri, options) {
}

function broadcastZeroconf(options) {
const bonjour = require("bonjour")();
bonjour.publish({
name: "Webpack Dev Server",
port: options.port,
Expand Down

0 comments on commit b97dc5e

Please sign in to comment.