Files
blitzkit/scripts/build.ts
T

28 lines
511 B
TypeScript
Raw Normal View History

2023-10-01 16:56:59 -05:00
import { build } from 'esbuild';
2023-10-15 15:42:36 -05:00
const FILES = ['bot', 'index'];
2023-10-01 16:56:59 -05:00
await build({
2023-10-15 15:42:36 -05:00
entryPoints: FILES.map((file) => `src/${file}.ts`),
outdir: 'dist/bot',
2023-10-01 16:56:59 -05:00
platform: 'node',
tsconfig: 'tsconfig.esbuild.json',
loader: {
'.node': 'copy',
'.ttf': 'file',
},
format: 'cjs',
jsx: 'transform',
2023-10-15 15:42:36 -05:00
outExtension: {
'.js': '.cjs',
},
2023-10-01 16:56:59 -05:00
bundle: true,
sourcemap: true,
minifyIdentifiers: false, // cause goofy errors
minifySyntax: true,
minifyWhitespace: true,
logLevel: 'info',
});