From 9ea1d833fb006fd3602ecb27faedbc280eb7f47d Mon Sep 17 00:00:00 2001 From: ChainEx <57598532+AniketSindhu@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:28:39 +0530 Subject: [PATCH] fix: trying to fix deployment --- config-overrides.js | 30 ++++++++++-------------------- package.json | 1 + 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/config-overrides.js b/config-overrides.js index c691e8f..4e38cad 100644 --- a/config-overrides.js +++ b/config-overrides.js @@ -1,23 +1,13 @@ -const webpack = require("webpack"); - -module.exports = function override(config) { - const fallback = config.resolve.fallback || {}; - Object.assign(fallback, { - crypto: require.resolve("crypto-browserify"), - stream: require.resolve("stream-browserify"), - assert: require.resolve("assert"), +module.exports = function override(config, env) { + console.log("override..."); + let loaders = config.resolve; + loaders.fallback = { + fs: false, http: require.resolve("stream-http"), - https: require.resolve("https-browserify"), - os: require.resolve("os-browserify"), - url: require.resolve("url"), - zlib: require.resolve("browserify-zlib") - }); - config.resolve.fallback = fallback; - config.plugins = (config.plugins || []).concat([ - new webpack.ProvidePlugin({ - process: "process/browser", - Buffer: ["buffer", "Buffer"] - }) - ]); + zlib: require.resolve("browserify-zlib"), + path: require.resolve("path-browserify"), + crypto: require.resolve("crypto-browserify") + }; + return config; }; diff --git a/package.json b/package.json index be6d2f1..3f7bd2f 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "ethers": "^6.9.0", "graphql": "^16.8.1", "net": "^1.0.2", + "path-browserify": "^1.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hot-toast": "^2.4.1",