update for baseURL

This commit is contained in:
2025-05-17 15:55:41 +08:00
parent 2338242018
commit 2369417961
18 changed files with 566 additions and 453 deletions

View File

@@ -1,16 +1,16 @@
// @ts-check
// https://bun.sh/docs/bundler
// @ts-ignore
import { resolvePath } from '@kevisual/use-config/env';
import pkg from './package.json';
import { rollup } from 'rollup';
import rollupConfig from './rollup.config.mjs';
import { execSync } from 'node:child_process';
// bun run src/index.ts --
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: ['./src/provider/index.ts'],
outdir: './dist',
entrypoints: [resolvePath('./src/provider/index.ts')],
outdir: resolvePath('./dist'),
naming: {
entry: 'ai-provider.mjs',
},
@@ -21,8 +21,5 @@ await Bun.build({
env: 'ENVISION_*',
});
// Rollup build for the CLI
const rollupBundle = await rollup(rollupConfig);
rollupBundle.write({
file: 'dist/ai-provider.d.ts',
});
const cmd = 'dts -i src/provider/index.ts -o ai-provider.d.ts';
execSync(cmd, { stdio: 'inherit' });