diff --git a/webworker/stream-promises.js b/webworker/module-empty.js similarity index 100% rename from webworker/stream-promises.js rename to webworker/module-empty.js diff --git a/webworker/url-stub.js b/webworker/url-stub.js deleted file mode 100644 index 6d30054f..00000000 --- a/webworker/url-stub.js +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-check - -"use strict"; - -module.exports = {}; diff --git a/webworker/webpack.config.js b/webworker/webpack.config.js index 69935fb7..2fcc75ee 100644 --- a/webworker/webpack.config.js +++ b/webworker/webpack.config.js @@ -27,11 +27,11 @@ module.exports = { resource.request = module; } ), - // Intercept "node:stream/promises" lacking a browserify entry + // Intercept "node:stream/consumers" and "node:stream/promises" lacking a browserify entry new webpack.NormalModuleReplacementPlugin( - /^stream\/promises$/u, + /^stream\/(?:consumers|promises)$/u, (resource) => { - resource.request = require.resolve("./stream-promises.js"); + resource.request = require.resolve("./module-empty.js"); } ), // Intercept existing "unicorn-magic" package to provide missing import @@ -55,7 +55,7 @@ module.exports = { "process": require.resolve("./process-stub.js"), "process-wrapper": require.resolve("./process-stub.js"), "stream": require.resolve("stream-browserify"), - "url": require.resolve("./url-stub.js") + "url": require.resolve("./module-empty.js") } } };