const nxWebpack = require('@nrwl/react/plugins/webpack') module.exports = config => { const nxWebpackConfig = nxWebpack(config) const webpackConfig = { ...nxWebpackConfig, resolve : { ...nxWebpackConfig.resolve, fallback: { ...nxWebpackConfig.resolve.fallback, "http": require.resolve("stream-http"), "https": require.resolve("https-browserify"), "stream": require.resolve("stream-browserify"), "zlib": require.resolve("browserify-zlib"), }, } } if (process.env.NODE_ENV === 'production') { return { ...webpackConfig, mode: 'production', devtool: 'source-map', } } else { return webpackConfig } }