From 8454ad5ed5007e527b739f9a8f7e7042588592b2 Mon Sep 17 00:00:00 2001 From: Mico Piira Date: Fri, 23 Jun 2017 12:37:02 +0300 Subject: [PATCH] Add empty mock for dgram --- packages/react-scripts/config/webpack.config.dev.js | 1 + packages/react-scripts/config/webpack.config.prod.js | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 55d3b6ad74c..070b05c1e65 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -275,6 +275,7 @@ module.exports = { // Some libraries import Node modules but don't use them in the browser. // Tell Webpack to provide empty mocks for them so importing them works. node: { + dgram: 'empty', fs: 'empty', net: 'empty', tls: 'empty', diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 5943c14502c..1ee1b202617 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -341,6 +341,7 @@ module.exports = { // Some libraries import Node modules but don't use them in the browser. // Tell Webpack to provide empty mocks for them so importing them works. node: { + dgram: 'empty', fs: 'empty', net: 'empty', tls: 'empty',