feat: added sharding

This commit is contained in:
TrèsAbhi committed 2023-10-15 15:42:36 -05:00
1 parent ad51be7afc
commit 43f634e198
5 files changed
+21 -6

No files matched your search

+6 -5
View File
@@ -1,10 +1,10 @@
import { build } from 'esbuild';
console.log('Building bot...');
const FILES = ['bot', 'index'];
await build({
entryPoints: ['src/bot.ts'],
outfile: 'dist/bot/index.cjs',
entryPoints: FILES.map((file) => `src/${file}.ts`),
outdir: 'dist/bot',
platform: 'node',
tsconfig: 'tsconfig.esbuild.json',
@@ -14,6 +14,9 @@ await build({
},
format: 'cjs',
jsx: 'transform',
outExtension: {
'.js': '.cjs',
},
bundle: true,
sourcemap: true,
@@ -23,5 +26,3 @@ await build({
logLevel: 'info',
});
console.log('Built bot');