1
0
Fork 0
cautious-journey/config/esbuild.mjs

25 lines
437 B
JavaScript

import { build } from 'esbuild';
import { join } from 'path';
const root = process.cwd();
build({
bundle: true,
entryPoints: [
join(root, 'out/src/index.js'),
],
format: 'cjs',
keepNames: true,
loader: {
'.yml': 'text',
},
outdir: 'out/bundle/',
outExtension: {
'.js': '.cjs',
},
platform: 'node',
}).catch((err) => {
console.error(err);
process.exit(1);
});