23 lines
		
	
	
		
			530 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			530 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
// @ts-check
 | 
						|
import { resolvePath } from '@kevisual/use-config';
 | 
						|
import { execSync } from 'node:child_process';
 | 
						|
 | 
						|
const entry = 'src/index.ts';
 | 
						|
const naming = 'app';
 | 
						|
const external = ['sequelize', 'pg', 'ioredis', 'pm2'];
 | 
						|
/**
 | 
						|
 * @type {import('bun').BuildConfig}
 | 
						|
 */
 | 
						|
// @ts-ignore
 | 
						|
await Bun.build({
 | 
						|
  target: 'node',
 | 
						|
  format: 'esm',
 | 
						|
  entrypoints: [resolvePath(entry, { meta: import.meta })],
 | 
						|
  outdir: resolvePath('./dist', { meta: import.meta }),
 | 
						|
  naming: {
 | 
						|
    entry: `${naming}.js`,
 | 
						|
  },
 | 
						|
  external,
 | 
						|
  env: 'KEVISUAL_*',
 | 
						|
});
 |