let {watch } = require("fs");
let watcher = watch("./index.css",(eventType, filename) => {
console.log("event trigger")
console.log(eventType);
console.log(filename);
})
//当我修改./index.css文件的时候,输出
event trigger
change
index.css
event trigger
change
index.css
为什么会触发2次change事件??