Also polyfill buffer and process/browser

johannes/nuke-worker-loader
Johannes Marbach 2023-10-16 08:16:28 +02:00
parent 0b706bb1de
commit 88666ee647
1 changed files with 6 additions and 2 deletions

View File

@ -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',