From 01a0d737c79e02140c3cc0996d05ebd8a4eb3f84 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Mon, 2 Oct 2017 23:45:20 -0400 Subject: [PATCH] Fix Windows compatibility (#3232) * Windows compatibility * Use regex for mutli-replace --- packages/react-scripts/config/webpackDevServer.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpackDevServer.config.js b/packages/react-scripts/config/webpackDevServer.config.js index a48a1fbc3a6..f401f2cce0d 100644 --- a/packages/react-scripts/config/webpackDevServer.config.js +++ b/packages/react-scripts/config/webpackDevServer.config.js @@ -77,7 +77,9 @@ module.exports = function(proxy, allowedHost) { // https://github.com/facebookincubator/create-react-app/issues/1065 watchOptions: { ignored: new RegExp( - `^(?!${path.normalize(paths.appSrc + '/')}).+[\\/]node_modules[\\/]`, + `^(?!${path + .normalize(paths.appSrc + '/') + .replace(/[\\]+/g, '\\\\')}).+[\\\\/]node_modules[\\\\/]`, 'g' ), },