Skip to content

Initial event won't fire if the dir depth is less than 2 #144

@liximomo

Description

@liximomo

System: MacOS 10.14.6
Version: 2.0.0-beta.12

|-- dirA
  |-- a.js
  |-- b.js

|-- dirB
  |-- a.js
  |-- b.js
  |-- subDir
    |-- c.js
const wp = new Watchpack({
  aggregateTimeout: 300,
  ignored: ["**/.git"]
});
wp.on("aggregated", () => {
   console.log('not fire')
});

// initial “aggregated” event won't fire for dirA
wp.watch({ files: [], directories: ["/dirA"] });
const wp = new Watchpack({
  aggregateTimeout: 300,
  ignored: ["**/.git"]
});
wp.on("aggregated", () => {
   console.log('fired')
});

// initial “aggregated” event immediately fired for dirB
wp.watch({ files: [], directories: ["/dirB"] });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions