From 0a5e564ade89c966f798828790ab2bd2f5cb8a29 Mon Sep 17 00:00:00 2001 From: Mico Piira Date: Mon, 26 Jun 2017 18:48:21 +0300 Subject: [PATCH] Add empty mock for dgram (#2600) --- 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',