mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-21 19:13:03 +00:00
Exclude JS files from copying with a .endsWith
Unfortunately, the src is relative on Unix-like systems and absolute on Windows systems. I don't know who has decided for that bullshit, but surely there must be a reason. For now, it's easier to just do a little string comparison.
This commit is contained in:
parent
1a4f26c538
commit
f169b79e3e
1 changed files with 1 additions and 9 deletions
|
@ -13,14 +13,6 @@ const files = [
|
|||
path.join("src", "options", "options.js"),
|
||||
];
|
||||
|
||||
/**
|
||||
* This array contains all files that we don't want to copy from the `src` folder.
|
||||
* For now, only exact filenames are supported, neither directories, glob patterns or regular expressions.
|
||||
*
|
||||
* @type {string[]}
|
||||
*/
|
||||
const ignore = [];
|
||||
|
||||
/**
|
||||
* @type {import("esbuild").BuildOptions}
|
||||
*/
|
||||
|
@ -49,7 +41,7 @@ export const defaultBuildOptions = {
|
|||
recursive: true,
|
||||
|
||||
// Return true if the file should be copied and false otherwise.
|
||||
filter: (src) => ![...files, ...ignore].includes(src),
|
||||
filter: (src) => !src.endsWith(".js"),
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue