Skip to content

Commit

Permalink
fix: build sequence for event executions
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Dec 2, 2023
1 parent ab58ef2 commit a1f8d2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ buildContext.on("error", (errors) => {

buildContext.on("build", async () => {
process.stdout.write("[custom-builder] Built\n");

await writeFile(
"./dist/cjs/package.json",
JSON.stringify({ type: "commonjs" }),
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ContextManager {

async build() {
await this.#createContext();
this.#contexts.forEach((x) => x.rebuild());
await Promise.all(this.#contexts.map((x) => x.rebuild()));

this.#eventBus.emit("build");
}
Expand Down

0 comments on commit a1f8d2c

Please sign in to comment.