diff options
author | Vendicated <vendicated@riseup.net> | 2023-03-11 00:25:32 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-03-11 00:25:32 +0100 |
commit | d5c05d857f35f1eb101cbbd9d2b646994333d3b1 (patch) | |
tree | 56e034c27fbec2f3647a122899c7d2db9d036c62 /scripts/build/common.mjs | |
parent | bff67885461a60ddd533b1dcec353efb66d4f1a0 (diff) | |
download | Vencord-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.mjs | 6 |
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`; |