Watch for changes in src/**/node_modules (#3230)

* Allow the dev server to watch for changes in src/node_modules

* fix eslint error

* fix broken regex

* handle trailing slash edge case for file paths

Closes #2760
Fixes #3223
This commit is contained in:
Joe Lim
2017-10-02 19:57:02 -07:00
committed by Joe Haddad
parent c00358376b
commit 1e98d0f428
2 changed files with 14 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ function getProcessCommand(processId, processDirectory) {
execOptions
);
command = command.replace(/\n$/, '')
command = command.replace(/\n$/, '');
if (isProcessAReactApp(command)) {
const packageName = getPackageNameInDirectory(processDirectory);
@@ -68,8 +68,12 @@ function getProcessForPort(port) {
var processId = getProcessIdOnPort(port);
var directory = getDirectoryOfProcessById(processId);
var command = getProcessCommand(processId, directory);
return chalk.cyan(command) + chalk.grey(' (pid ' + processId + ')\n') +
chalk.blue(' in ') + chalk.cyan(directory);
return (
chalk.cyan(command) +
chalk.grey(' (pid ' + processId + ')\n') +
chalk.blue(' in ') +
chalk.cyan(directory)
);
} catch (e) {
return null;
}