message: fix(bundler-vite): args type for build complete listener
diff: @@ -6,7 +6,7 @@ import type { InlineConfig as ViteInlineConfig } from 'vite';
  interface IOpts {
  cwd: string;
  - userConfig: IConfig,
  + userConfig: IConfig;
  viteConfig: ViteInlineConfig;
  onBuildComplete?: Function;
  clean?: boolean;
  @@ -15,11 +15,30 @@ interface IOpts {
  export async function viteBuild(opts: IOpts) {
  const { viteConfig } = opts;
  - const buildConfig = mergeConfig({
  + const buildConfig = mergeConfig(
  + {
  root: opts.cwd,
  mode: Env.production,
  - }, viteConfig);
  - const result = await build(buildConfig);
  + },
  + viteConfig,
  + );
  + const startTms = +new Date();
  + const result: {
  + isFirstCompile: boolean;
  + stats?: any;
  + time: number;
  + err?: Error;
  + } = {
  + isFirstCompile: true,
  + time: 0,
  + };
  - opts.onBuildComplete && opts.onBuildComplete(result, buildConfig);
  + try {
  + result.stats = await build(buildConfig);
  + result.time = +new Date() - startTms;
  + } catch (err: any) {
  + result.err = err;
  + }
  +
  + opts.onBuildComplete && opts.onBuildComplete(result);
  }
  