diff --git a/lib/Server.js b/lib/Server.js index aed9eab65e..c8126e320b 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -17,7 +17,6 @@ const tls = require('tls'); const url = require('url'); const http = require('http'); const https = require('https'); -const spdy = require('spdy'); const sockjs = require('sockjs'); const semver = require('semver'); @@ -635,7 +634,12 @@ class Server { if (semver.gte(process.version, '10.0.0')) { this.listeningApp = https.createServer(options.https, app); } else { - this.listeningApp = spdy.createServer(options.https, app); + /* eslint-disable global-require */ + // The relevant issues are: + // https://github.com/spdy-http2/node-spdy/issues/350 + // https://github.com/webpack/webpack-dev-server/issues/1592 + this.listeningApp = require('spdy').createServer(options.https, app); + /* eslint-enable global-require */ } } else { this.listeningApp = http.createServer(app);