Skip to content

Commit

Permalink
fix crash of wds when trying to follow emacs lock files by ignoring t…
Browse files Browse the repository at this point in the history
…hem in file watcher.

closes facebook#9056
  • Loading branch information
zalox committed Jan 30, 2022
1 parent 428ddb6 commit ae1eb65
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/react-dev-utils/ignoredFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ const path = require('path');
const escape = require('escape-string-regexp');

module.exports = function ignoredFiles(appSrc) {
return new RegExp(
`^(?!${escape(
path.normalize(appSrc + '/').replace(/[\\]+/g, '/')
)}).+/node_modules/`,
'g'
);
return [
new RegExp(
`^(?!${escape(
path.normalize(appSrc + '/').replace(/[\\]+/g, '/'),
)}).+/node_modules/`,
'g',
),
'**/.#*',
'**/*~',
'**/#*#',
];
};

0 comments on commit ae1eb65

Please sign in to comment.