import env from '../env.ts' if (env.NODE_ENV === 'development') { // output filename in console log and colour console.dir await import('@bmp/console').then((mod) => mod.default({ log: true, error: true, dir: true })) const { default: chalk } = await import('chalk') process.on('uncaughtException', (err, origin) => { console.error(chalk.red(`UNCAUGHT EXCEPTION`), chalk.yellow(` (${origin})`)) console.error(err) }) process.on('unhandledRejection', (err, promise) => { console.error(chalk.red('UNHANDLED REJECTION')) console.error(promise) console.error(err) }) }