babel --watch should have equivalent file selection logic with babel (#10283)
* fix(watcher): skip non-compilable file only when it is not included in filenames argument * perf: disable globbing for watch
This commit is contained in:
parent
c6e966cac9
commit
c9a68984d6
@ -216,6 +216,7 @@ export default async function({
|
||||
const chokidar = util.requireChokidar();
|
||||
chokidar
|
||||
.watch(filenames, {
|
||||
disableGlobbing: true,
|
||||
persistent: true,
|
||||
ignoreInitial: true,
|
||||
awaitWriteFinish: {
|
||||
@ -224,7 +225,10 @@ export default async function({
|
||||
},
|
||||
})
|
||||
.on("all", function(type: string, filename: string): void {
|
||||
if (!util.isCompilableExtension(filename, cliOptions.extensions)) {
|
||||
if (
|
||||
!util.isCompilableExtension(filename, cliOptions.extensions) &&
|
||||
!filenames.includes(filename)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user