diff --git a/webapp/package.json b/webapp/package.json index 001999078..32e0338bd 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -24,6 +24,7 @@ "@uppy/xhr-upload": "^1.6.10", "@vueuse/components": "^10.7.2", "bootstrap": "^4.5.3", + "buffer": "^6.0.3", "crypto-browserify": "^3.12.0", "cytoscape": "^3.23.0", "cytoscape-cola": "^2.5.1", @@ -35,6 +36,7 @@ "mermaid": "^10.1.0", "primeicons": "^7.0.0", "primevue": "^4.0.0", + "process": "^0.11.10", "qrcode-vue3": "^1.6.8", "serve": "^14.2.1", "stream-browserify": "^3.0.0", diff --git a/webapp/vue.config.js b/webapp/vue.config.js index 2270c37c2..0ceae967a 100644 --- a/webapp/vue.config.js +++ b/webapp/vue.config.js @@ -1,9 +1,13 @@ +const { ProvidePlugin } = require("webpack"); + module.exports = { transpileDependencies: ["mermaid"], configureWebpack: (config) => { config.resolve.fallback = { crypto: require.resolve("crypto-browserify"), stream: require.resolve("stream-browserify"), + process: require.resolve("process/browser"), + buffer: require.resolve("buffer/"), }; config.externals = { ...config.externals, @@ -14,6 +18,12 @@ module.exports = { include: /node_modules/, type: "javascript/auto", }); + config.plugins = [ + ...(config.plugins || []), + new ProvidePlugin({ + process: "process/browser", + }), + ]; }, chainWebpack: (config) => { config.plugin("html").tap((args) => { diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 271e7ce27..b906e4fa5 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -3084,6 +3084,14 @@ buffer@^5.5.0, buffer@^5.7.1: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -5663,7 +5671,7 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==