Skip to content

Client build may be longer than server build and trigger a race condition #490

@GauBen

Description

@GauBen

Environment and versions used

JSM 0.9

Steps to reproduce

Have a client build longer than the server build.

Right now the post-build hook is triggered when the server builds complete:

function buildSuccessPlugin(callback: () => void | Promise<void>): Plugin {
return {
name: "build-success-callback",
async closeBundle(error) {
if (!error) await callback();
},
};
}

Because the client build may last longer, the yarn watch:callback command may run before the build completes

Desired Behavior

Ensure both builds complete before running the yarn watch:callback command

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions