diff --git a/package-lock.json b/package-lock.json index 9affd2a35..93377484d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,6 +44,7 @@ "babel-loader": "8.3.0", "babel-plugin-transform-require-context": "0.1.1", "bowser": "1.9.4", + "buffer": "6.0.3", "canvas": "2.11.2", "classnames": "2.5.1", "cookie": "0.4.1", @@ -6178,9 +6179,9 @@ } }, "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, "funding": [ { @@ -6198,7 +6199,7 @@ ], "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "ieee754": "^1.2.1" } }, "node_modules/buffer-alloc": { @@ -26851,6 +26852,50 @@ "through": "^2.3.8" } }, + "node_modules/unbzip2-stream/node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/unbzip2-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", diff --git a/package.json b/package.json index 150ea07a0..4779e81ae 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "devDependencies": { "@babel/cli": "7.23.9", "@babel/core": "7.23.9", + "@babel/eslint-parser": "7.11.0", "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/plugin-transform-async-to-generator": "7.23.3", "@babel/plugin-transform-object-rest-spread": "7.23.4", @@ -75,10 +76,10 @@ "@types/jest": "29.5.12", "async": "3.2.5", "autoprefixer": "10.4.17", - "@babel/eslint-parser": "7.11.0", "babel-loader": "8.3.0", "babel-plugin-transform-require-context": "0.1.1", "bowser": "1.9.4", + "buffer": "6.0.3", "canvas": "2.11.2", "classnames": "2.5.1", "cookie": "0.4.1", diff --git a/webpack.config.js b/webpack.config.js index 4a1dbe312..800ed86e3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -107,8 +107,9 @@ module.exports = { }, resolve: { fallback: { - // jszip uses Node's `stream` module, which is no longer polyfilled by default in Webpack 5 - stream: require.resolve('stream-browserify') + // Node modules are no longer polyfilled by default in Webpack 5, so we need to add these here + buffer: require.resolve('buffer/'), + stream: require.resolve('stream-browserify') // jszip }, symlinks: false // Fix local development with `npm link` packages },