diff --git a/src/hooks/getChangedFiles.ts b/src/hooks/getChangedFiles.ts index 669a08ea..1ab2b72e 100644 --- a/src/hooks/getChangedFiles.ts +++ b/src/hooks/getChangedFiles.ts @@ -15,17 +15,7 @@ function getChangedFiles(compiler: webpack.Compiler): string[] { changedFiles = Object.keys((watcher && watcher.mtimes) || {}); } - return ( - changedFiles - // normalize paths - .map((changedFile) => path.normalize(changedFile)) - // check if path is inside the context to filer-out some trash from fs - .filter( - (changedFile) => - !compiler.options.context || - changedFile.startsWith(path.normalize(compiler.options.context)) - ) - ); + return changedFiles.map((changedFile) => path.normalize(changedFile)); } export { getChangedFiles }; diff --git a/src/hooks/getDeletedFiles.ts b/src/hooks/getDeletedFiles.ts index 8e5dd74c..b793a69b 100644 --- a/src/hooks/getDeletedFiles.ts +++ b/src/hooks/getDeletedFiles.ts @@ -17,17 +17,7 @@ function getDeletedFiles( deletedFiles = [...state.removedFiles]; } - return ( - deletedFiles - // normalize paths - .map((changedFile) => path.normalize(changedFile)) - // check if path is inside the context to filer-out some trash from fs - .filter( - (changedFile) => - !compiler.options.context || - changedFile.startsWith(path.normalize(compiler.options.context)) - ) - ); + return deletedFiles.map((changedFile) => path.normalize(changedFile)); } export { getDeletedFiles };