cli: filter js and map
This commit is contained in:
parent
3344fb0b9f
commit
179a95e2de
@ -41,6 +41,9 @@ export default async function dev() {
|
|||||||
alwaysStat: true,
|
alwaysStat: true,
|
||||||
})
|
})
|
||||||
.on("change", (jsFile) => {
|
.on("change", (jsFile) => {
|
||||||
|
if (!jsFile.endsWith(".js") && !jsFile.endsWith(".map")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const content = fs.readFileSync(jsFile, "utf-8");
|
const content = fs.readFileSync(jsFile, "utf-8");
|
||||||
if (cachedContents[jsFile]) {
|
if (cachedContents[jsFile]) {
|
||||||
if (content.indexOf(cachedContents[jsFile]) >= 0) {
|
if (content.indexOf(cachedContents[jsFile]) >= 0) {
|
||||||
|
Reference in New Issue
Block a user