From 6cdea4f4ac8596acfe3dc7870f1d4464479ac82e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Feb 2023 13:58:37 +0100 Subject: [PATCH] Added webpack file --- apps/wallet-connect/webpack.config.js | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 apps/wallet-connect/webpack.config.js diff --git a/apps/wallet-connect/webpack.config.js b/apps/wallet-connect/webpack.config.js new file mode 100644 index 0000000000..32991b2e69 --- /dev/null +++ b/apps/wallet-connect/webpack.config.js @@ -0,0 +1,32 @@ +const nxWebpack = require('@nrwl/react/plugins/webpack') + +module.exports = config => { + const nxWebpackConfig = nxWebpack(config) + + const webpackConfig = { + ...nxWebpackConfig, + resolve : { + ...nxWebpackConfig.resolve, + fallback: { + ...nxWebpackConfig.resolve.fallback, + "crypto": require.resolve("crypto-browserify"), + "stream": require.resolve("stream-browserify"), + "http" : require.resolve("stream-http"), + "https" : require.resolve("https-browserify"), + "path" : require.resolve("path-browserify"), + "module": false, + "fs" : false + }, + } + } + + if (process.env.NODE_ENV === 'production') { + return { + ...webpackConfig, + mode: 'production', + devtool: 'source-map', + } + } else { + return webpackConfig + } +}