import { build } from 'vite'; try { const result = await build(); console.log('BUILD OK'); if (result?.output) { result.output.forEach(o => console.log(' →', o.fileName, o.type, o.code?.length || '')); } } catch (e) { console.error('BUILD ERROR:', e.message); if (e.loc) console.error('Location:', JSON.stringify(e.loc)); if (e.frame) console.error(e.frame); console.error(e.stack); }