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 Mar 18, 2021
1 parent 5fc8350 commit e5605b1
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 e5605b1

Please sign in to comment.