feat: add index file to export app module
This commit is contained in:
22
bun.config.ts
Normal file
22
bun.config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { resolvePath } from '@kevisual/use-config';
|
||||
import { execSync } from 'node:child_process';
|
||||
|
||||
const entry = 'src/index.ts';
|
||||
const naming = 'app';
|
||||
const external: string[] = [];
|
||||
/**
|
||||
* @type {import('bun').BuildConfig}
|
||||
*/
|
||||
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 dts = 'dts -i src/index.ts -o app.d.ts';
|
||||
execSync(dts);
|
||||
Reference in New Issue
Block a user