From 0b9c6bee8a958b7747a249ec8c73a87f0bad2aad Mon Sep 17 00:00:00 2001 From: nachtjasmin Date: Wed, 31 May 2023 19:50:17 +0200 Subject: [PATCH] Invert the filter for static file copying A better name would have been "include" instead of "filter". --- scripts/shared.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/shared.mjs b/scripts/shared.mjs index 0e16396..d54a7de 100644 --- a/scripts/shared.mjs +++ b/scripts/shared.mjs @@ -43,7 +43,9 @@ export const defaultBuildOptions = { src: "./src/", dest: "./dist/", 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), }), ], };