From c6252c2367a750161069d76449694a5c9bfd95c9 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 --- config/webpackDevServer.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/webpackDevServer.config.js b/config/webpackDevServer.config.js index a48a1fbc3a6..f401f2cce0d 100644 --- a/config/webpackDevServer.config.js +++ b/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' ), },