Fix Windows compatibility (#3232)

* Windows compatibility

* Use regex for mutli-replace
This commit is contained in:
Joe Haddad
2017-10-02 23:45:20 -04:00
committed by GitHub
parent f498547408
commit 01a0d737c7

View File

@@ -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'
),
},