From 88666ee647cddd37825ab6da324cf55a45168489 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 16 Oct 2023 08:16:28 +0200 Subject: [PATCH] Also polyfill buffer and process/browser --- webpack.config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index d906dc869d..563d14d90a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -250,6 +250,10 @@ module.exports = (env, argv) => { // Polyfill needed by counterpart util: require.resolve("util/"), + // Polyfill needed by matrix-js-sdk/src/crypto + buffer: require.resolve("buffer/"), + // Polyfill needed by sentry + "process/browser": require.resolve("process/browser") } }, @@ -721,8 +725,8 @@ module.exports = (env, argv) => { new webpack.EnvironmentPlugin(["VERSION"]), - // Automatically load buffer & process modules. Webpack 5 doesn't polyfill them - // automatically anymore. + // Automatically load buffer & process modules as we use them without explicitly + // importing them. new webpack.ProvidePlugin({ Buffer: ['buffer', 'Buffer'], process: 'process/browser',