mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 12:45:11 +08:00
Also polyfill buffer and process/browser
This commit is contained in:
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
Block a user