Invert the filter for static file copying

A better name would have been "include" instead of "filter".
This commit is contained in:
nachtjasmin 2023-05-31 19:50:17 +02:00
parent a0c5bfc64c
commit 0b9c6bee8a
No known key found for this signature in database

View file

@ -43,7 +43,9 @@ export const defaultBuildOptions = {
src: "./src/", src: "./src/",
dest: "./dist/", dest: "./dist/",
recursive: true, recursive: true,
filter: (src) => files.includes(src) || ignore.includes(src),
// Return true if the file should be copied and false otherwise.
filter: (src) => ![...files, ...ignore].includes(src),
}), }),
], ],
}; };