feat: add百炼
This commit is contained in:
@@ -17,9 +17,29 @@ await Bun.build({
|
||||
|
||||
define: {
|
||||
ENVISION_VERSION: JSON.stringify(pkg.version),
|
||||
IS_BROWSER: JSON.stringify(false),
|
||||
},
|
||||
env: 'ENVISION_*',
|
||||
});
|
||||
|
||||
const cmd = 'dts -i src/provider/index.ts -o ai-provider.d.ts';
|
||||
execSync(cmd, { stdio: 'inherit' });
|
||||
execSync('cp dist/ai-provider.d.ts dist/ai-provider-browser.d.ts', { stdio: 'inherit' });
|
||||
|
||||
// bun run src/index.ts --
|
||||
await Bun.build({
|
||||
target: 'browser',
|
||||
format: 'esm',
|
||||
entrypoints: [resolvePath('./src/provider/index.ts')],
|
||||
outdir: resolvePath('./dist'),
|
||||
naming: {
|
||||
entry: 'ai-provider-browser.js',
|
||||
},
|
||||
|
||||
define: {
|
||||
ENVISION_VERSION: JSON.stringify(pkg.version),
|
||||
IS_BROWSER: JSON.stringify(true),
|
||||
},
|
||||
env: 'ENVISION_*',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user