aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/common.mjs
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-03-11 00:25:32 +0100
committerVendicated <vendicated@riseup.net>2023-03-11 00:25:32 +0100
commitd5c05d857f35f1eb101cbbd9d2b646994333d3b1 (patch)
tree56e034c27fbec2f3647a122899c7d2db9d036c62 /scripts/build/common.mjs
parentbff67885461a60ddd533b1dcec353efb66d4f1a0 (diff)
downloadVencord-d5c05d857f35f1eb101cbbd9d2b646994333d3b1.tar.gz
Vencord-d5c05d857f35f1eb101cbbd9d2b646994333d3b1.tar.bz2
Vencord-d5c05d857f35f1eb101cbbd9d2b646994333d3b1.zip
Add DevOnly plugin capability
Diffstat (limited to 'scripts/build/common.mjs')
-rw-r--r--scripts/build/common.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
index c6a082d..1689470 100644
--- a/scripts/build/common.mjs
+++ b/scripts/build/common.mjs
@@ -69,9 +69,9 @@ export const globPlugins = {
const files = await readdir(`./src/${dir}`);
for (const file of files) {
if (file.startsWith(".")) continue;
- if (file === "index.ts") {
- continue;
- }
+ if (file === "index.ts") continue;
+ if (!watch && (file.endsWith(".dev.ts") || file.endsWith(".dev.tsx"))) continue;
+
const mod = `p${i}`;
code += `import ${mod} from "./${dir}/${file.replace(/\.tsx?$/, "")}";\n`;
plugins += `[${mod}.name]:${mod},\n`;