init
This commit is contained in:
20
bun.config.ts
Normal file
20
bun.config.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { resolvePath } from '@kevisual/use-config';
|
||||
import { execSync } from 'node:child_process';
|
||||
|
||||
const entry = 'src/index.ts';
|
||||
const naming = 'app';
|
||||
const external = ['pm2'];
|
||||
await Bun.build({
|
||||
target: 'browser',
|
||||
format: 'esm',
|
||||
entrypoints: [resolvePath(entry, { meta: import.meta })],
|
||||
outdir: resolvePath('./dist', { meta: import.meta }),
|
||||
naming: {
|
||||
entry: `${naming}.js`,
|
||||
},
|
||||
external,
|
||||
});
|
||||
|
||||
const cmd ='dts -i src/index.ts -o app.d.ts'
|
||||
execSync(cmd, { stdio: 'inherit' });
|
||||
console.log('Build completed.');
|
||||
Reference in New Issue
Block a user