this repo has no description
1import { rmdirSync, existsSync } from 'node:fs';
2
3if (await existsSync('./dist')) {
4 await rmdirSync('./dist');
5}
6
7await Bun.build({
8 entrypoints: ['src/index.ts'],
9 outdir: './dist',
10 naming: '[dir]/[name].[ext]',
11 sourcemap: true,
12 format: 'esm',
13});
14
15await Bun.build({
16 entrypoints: ['src/index.ts'],
17 outdir: './dist',
18 naming: '[dir]/[name].cjs.[ext]',
19 sourcemap: true,
20 format: 'cjs',
21});