From f29c7f6a6897e1189844574159f6baf6f6944f24 Mon Sep 17 00:00:00 2001 From: Alexandre Paixao Date: Mon, 17 Dec 2018 18:01:35 +0100 Subject: [PATCH] exclude node_modules from app sources --- packages/react-scripts/config/webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 746884a03eb..42d679fc26c 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -324,6 +324,7 @@ module.exports = function(webpackEnv) { }, ], include: paths.appSrc, + exclude: /[/\\]node_modules[/\\]/, }, { // "oneOf" will traverse all following loaders until one will @@ -346,6 +347,7 @@ module.exports = function(webpackEnv) { { test: /\.(js|mjs|jsx|ts|tsx)$/, include: paths.appSrc, + exclude: /[/\\]node_modules[/\\]/, loader: require.resolve('babel-loader'), options: { customize: require.resolve(