diff --git a/lib/Server.js b/lib/Server.js index 507f2c4714..2cbfd42c62 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -1964,12 +1964,9 @@ class Server { (req, res) => { res.setHeader("Content-Type", "application/javascript"); - const { createReadStream } = fs; const clientPath = path.join(__dirname, "..", "client"); - createReadStream( - path.join(clientPath, "modules/sockjs-client/index.js") - ).pipe(res); + res.sendFile(path.join(clientPath, "modules/sockjs-client/index.js")); } ); diff --git a/package-lock.json b/package-lock.json index 0b3e435abb..f0a59e3e0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,6 +99,10 @@ "engines": { "node": ">= 12.13.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, "peerDependencies": { "webpack": "^4.37.0 || ^5.0.0" },