fix: stop ci if plugin client build failed (#5650)

This commit is contained in:
gchust 2024-11-14 16:40:02 +08:00 committed by GitHub
parent e1e2880a06
commit 2617854965
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -470,15 +470,15 @@ export async function buildPluginClient(cwd: string, userConfig: UserConfig, sou
return new Promise((resolve, reject) => {
compiler.run((err, stats) => {
if (err) {
reject(err);
const compilationErrors = stats?.compilation.errors;
const infos = stats.toString({
colors: true,
});
if (err || compilationErrors?.length) {
reject(err || infos);
return;
}
console.log(
stats.toString({
colors: true,
}),
);
console.log(infos);
resolve(null);
});
});