Also polyfill buffer and process/browser
parent
0b706bb1de
commit
88666ee647
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue