Skip to content

Commit

Permalink
Refactor extra watch options regex to react-dev-utils (facebook#3362)
Browse files Browse the repository at this point in the history
* extra watch options regex to react-dev-utils

* fix regex

* add test

* fix eslint error

* include react-dev-utils test in CI script

* attempt to fix import error

* attempt to fix error on CI

* Update .eslintrc
  • Loading branch information
xjlim authored and Timer committed Nov 4, 2017
1 parent 50cfacd commit e5e235a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ module.exports = {
},
mangle: {
safari10: true,
},
},
output: {
comments: false,
// Turned on because emoji and regex is not minified properly using default
Expand Down
9 changes: 2 additions & 7 deletions config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const path = require('path');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
const config = require('./webpack.config.dev');
const paths = require('./paths');

Expand Down Expand Up @@ -76,12 +76,7 @@ module.exports = function(proxy, allowedHost) {
// src/node_modules is not ignored to support absolute imports
// https://github.com/facebookincubator/create-react-app/issues/1065
watchOptions: {
ignored: new RegExp(
`^(?!${path
.normalize(paths.appSrc + '/')
.replace(/[\\]+/g, '\\\\')}).+[\\\\/]node_modules[\\\\/]`,
'g'
),
ignored: ignoredFiles(paths.appSrc),
},
// Enable HTTPS if the HTTPS environment variable is set to 'true'
https: protocol === 'https',
Expand Down

0 comments on commit e5e235a

Please sign in to comment.