---修改编译文件,修改文件错误

This commit is contained in:
2026-03-04 10:49:04 +08:00
parent 55ec9f537b
commit 76d11a0d05
5 changed files with 119 additions and 4 deletions

View File

@ -15,8 +15,21 @@ export const runBuild = async () => {
}
console.log(`${colors.cyan(`[${pkg.name}]`)}` + ' - build successfully!');
} catch (error) {
console.log(colors.red('vite build error:\n' + error));
} catch (error: any) {
console.error('\n');
console.error(colors.red('╔══════════════════════════════════════════════════════════════════╗'));
console.error(colors.red('║ 构建后处理错误 ║'));
console.error(colors.red('╚══════════════════════════════════════════════════════════════════╝'));
console.error('\n');
console.error(colors.yellow('错误详情:'));
console.error(error);
if (error.stack) {
console.error('\n');
console.error(colors.yellow('错误堆栈:'));
console.error(error.stack);
}
process.exit(1);
}
};