-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathesbuild.scheduler.config.mjs
More file actions
51 lines (46 loc) · 1.11 KB
/
esbuild.scheduler.config.mjs
File metadata and controls
51 lines (46 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import * as esbuild from 'esbuild';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
await esbuild.build({
entryPoints: [join(__dirname, 'processes/scheduler/index.ts')],
bundle: true,
platform: 'node',
target: 'node24',
format: 'cjs',
outfile: join(__dirname, 'dist/scheduler.js'),
external: [
// Native modules
'sqlite3',
'bufferutil',
// Discord.js (used by avatar update job, has native deps)
'discord.js',
'@discordjs/voice',
'@discordjs/rest',
'@discordjs/builders',
'@discordjs/util',
'@discordjs/ws',
// Node.js built-ins (automatically external, but explicit for clarity)
'fs',
'path',
'crypto',
'os',
'stream',
'http',
'https',
'net',
'tls',
'zlib',
'events',
'util',
],
treeShaking: true,
minify: true,
sourcemap: false,
logLevel: 'info',
banner: {
js: '// Scheduler Bundle - Generated by esbuild\n// MatchExec Match Bot\n',
},
});
console.log('✓ Scheduler bundled successfully');