ai-center/bun.config.mjs

29 lines
595 B
JavaScript

// @ts-check
// https://bun.sh/docs/bundler
// @ts-ignore
import pkg from './package.json';
import { rollup } from 'rollup';
import rollupConfig from './rollup.config.mjs';
// bun run src/index.ts --
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: ['./src/provider/index.ts'],
outdir: './dist',
naming: {
entry: 'ai-provider.mjs',
},
define: {
ENVISION_VERSION: JSON.stringify(pkg.version),
},
env: 'ENVISION_*',
});
// Rollup build for the CLI
const rollupBundle = await rollup(rollupConfig);
rollupBundle.write({
file: 'dist/ai-provider.d.ts',
});