mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 21:53:04 -04:00
Safe 2 update
This commit is contained in:
parent
29fd3ca13f
commit
39cfa3e367
3 changed files with 9 additions and 57 deletions
|
@ -262,20 +262,6 @@ export const stylePlugin: Plugin = {
|
|||
}
|
||||
};
|
||||
|
||||
let buildsFinished = Promise.resolve();
|
||||
const buildsFinishedPlugin: Plugin = {
|
||||
name: "builds-finished-plugin",
|
||||
setup({ onEnd }) {
|
||||
if (!watch) return;
|
||||
|
||||
let resolve: () => void;
|
||||
const done = new Promise<void>(r => resolve = r);
|
||||
buildsFinished = buildsFinished.then(() => done);
|
||||
|
||||
onEnd(() => resolve());
|
||||
},
|
||||
};
|
||||
|
||||
export const commonOpts = {
|
||||
logLevel: "info",
|
||||
bundle: true,
|
||||
|
@ -283,7 +269,7 @@ export const commonOpts = {
|
|||
sourcemap: watch ? "inline" : "external",
|
||||
legalComments: "linked",
|
||||
banner,
|
||||
plugins: [fileUrlPlugin, gitHashPlugin, gitRemotePlugin, stylePlugin, buildsFinishedPlugin],
|
||||
plugins: [fileUrlPlugin, gitHashPlugin, gitRemotePlugin, stylePlugin],
|
||||
external: ["~plugins", "~git-hash", "~git-remote", "/assets/*"],
|
||||
inject: ["./scripts/build/inject/react.mjs"],
|
||||
jsxFactory: "VencordCreateElement",
|
||||
|
@ -301,8 +287,6 @@ export async function buildOrWatchAll() {
|
|||
if (watch) {
|
||||
const contexts = await Promise.all(builds.map(context));
|
||||
await Promise.all(contexts.map(ctx => ctx.watch()));
|
||||
|
||||
await buildsFinished;
|
||||
} else {
|
||||
try {
|
||||
await Promise.all(builds.map(build));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue