|
|
|
|
|
|
|
|
| import { build } from 'esbuild';
|
| import path from 'node:path';
|
| import { fileURLToPath } from 'node:url';
|
|
|
| const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
| await build({
|
| entryPoints: [path.resolve(__dirname, '../src/server-host.ts')],
|
| bundle: true,
|
| platform: 'node',
|
| format: 'esm',
|
| target: 'node20',
|
| outfile: path.resolve(__dirname, '../build/server.mjs'),
|
| external: ['better-sqlite3'],
|
|
|
|
|
| banner: {
|
| js: "import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);",
|
| },
|
| logLevel: 'info',
|
| });
|
|
|