feat: esbuild build

This commit is contained in:
tresabhi committed 2024-11-26 21:03:01 -06:00
1 parent 5f256ed84d
commit ced3897696
6 files changed
+31 -8

No files matched your search

@@ -10,7 +10,7 @@ const fontsPromise = [
{ file: robotoBold, weight: 700 as const },
{ file: robotoBlack, weight: 900 as const },
].map(async ({ file, weight }) => {
const data = await readFile(file);
const data = await readFile(`${__dirname}/${file}`);
return { name: 'Roboto', weight, data };
});
@@ -3,7 +3,7 @@ import { Worker } from 'worker_threads';
const RENDER_WORKERS = 1;
const workers = [...Array(RENDER_WORKERS)].map(() => {
const worker = new Worker('src/workers/render.ts');
const worker = new Worker('dist/bot/workers/render.js');
console.log(`🟡 Launching render worker ${worker.threadId}`);
return worker;
});
+1 -1
View File
@@ -1,6 +1,6 @@
import { assertSecret } from '@blitzkit/core';
import { ShardingManager } from 'discord.js';
export const manager = new ShardingManager('src/workers/bot.ts', {
export const manager = new ShardingManager('dist/bot/workers/bot.js', {
token: assertSecret(process.env.DISCORD_TOKEN),
});