Also polyfill buffer and process/browser
This commit is contained in:
parent
0b706bb1de
commit
88666ee647
1 changed files with 6 additions and 2 deletions
|
@ -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 a new issue