Skip to content

Commit

Permalink
Merge branch 'main' into feat/brief-report-options
Browse files Browse the repository at this point in the history
  • Loading branch information
easy1090 authored Aug 29, 2024
2 parents c429b24 + e4cc529 commit 2dcebe7
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/core/src/inner-plugins/plugins/progress.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SDK } from '@rsdoctor/types';
import type { Plugin } from '@rsdoctor/types';
import { InternalBasePlugin } from './base';
import { debug } from '@rsdoctor/utils/logger';

export class InternalProgressPlugin<
T extends Plugin.BaseCompilerType<'webpack'>,
Expand All @@ -22,13 +23,17 @@ export class InternalProgressPlugin<
currentProgress.message = msg || '';

const api = SDK.ServerAPI.APIExtends.GetCompileProgess;
sdk.server.sendAPIDataToClient(api, {
req: {
api,
body: undefined,
},
res: currentProgress,
});
try {
sdk.server.sendAPIDataToClient(api, {
req: {
api,
body: undefined,
},
res: currentProgress,
});
} catch (e: any) {
debug(() => e);
}
},
});
progress.apply(compiler);
Expand Down

0 comments on commit 2dcebe7

Please sign in to comment.