feat(tsbundle): add configurable maxLineLength for base64ts output and improve build/error handling in child builds
This commit is contained in:
@@ -61,15 +61,21 @@ export class CustomBundleHandler {
|
||||
|
||||
// Build the bundle to temp location
|
||||
const tsbundle = new TsBundle();
|
||||
await tsbundle.build(
|
||||
this.cwd,
|
||||
bundleConfig.from,
|
||||
tempBundlePath,
|
||||
{
|
||||
bundler,
|
||||
production: bundleConfig.production || false,
|
||||
}
|
||||
);
|
||||
try {
|
||||
await tsbundle.build(
|
||||
this.cwd,
|
||||
bundleConfig.from,
|
||||
tempBundlePath,
|
||||
{
|
||||
bundler,
|
||||
production: bundleConfig.production || false,
|
||||
}
|
||||
);
|
||||
} catch (error: any) {
|
||||
console.error(`\n\x1b[31m❌ Bundle failed: ${bundleConfig.from} -> ${bundleConfig.to}\x1b[0m`);
|
||||
// Don't re-print error details - they were already shown by the child process
|
||||
return; // Skip output handling since build failed
|
||||
}
|
||||
|
||||
if (outputMode === 'base64ts') {
|
||||
await this.handleBase64TsOutput(bundleConfig, tempBundlePath);
|
||||
@@ -105,7 +111,7 @@ export class CustomBundleHandler {
|
||||
}
|
||||
|
||||
// Write the TypeScript output
|
||||
await base64Output.writeToFile(bundleConfig.to);
|
||||
await base64Output.writeToFile(bundleConfig.to, bundleConfig.maxLineLength);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user