feat(build): add comprehensive ESBuild error handling to Vite configurations
- Add ESBuild logLevel: 'error' to all Vite configs - Configure logOverride for critical errors: duplicate-export, duplicate-member, syntax-error, invalid-identifier - Ensure builds fail immediately on ESBuild compilation errors - Apply to common, web, and optimized Vite configurations Prevents broken code from being deployed due to build-time errors
This commit is contained in:
@@ -135,7 +135,11 @@ export async function createOptimizedBuildConfig(mode: string): Promise<UserConf
|
||||
target: 'es2015',
|
||||
supported: {
|
||||
'bigint': true
|
||||
}
|
||||
},
|
||||
// Fail on any ESBuild errors
|
||||
logLevel: 'error',
|
||||
// Ensure build fails on syntax errors
|
||||
logOverride: { 'duplicate-export': 'error' }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user