import { build } from 'esbuild'; import { dirname, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); await build({ absWorkingDir: root, entryPoints: [resolve(root, 'src/game.js')], bundle: true, format: 'esm', target: 'es2020', minify: true, outfile: resolve(root, 'dist/game.js') });