feat: 更新静态资源代理文档,优化路由和插件集成,提升代码可读性和功能性
This commit is contained in:
24
bun.config.ts
Normal file
24
bun.config.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import path from 'node:path';
|
||||
import pkg from './package.json';
|
||||
import fs from 'node:fs';
|
||||
import { execSync } from 'node:child_process';
|
||||
const w = (p: string) => path.resolve(import.meta.dir, p);
|
||||
|
||||
const external: string[] = ["bun"];
|
||||
await Bun.build({
|
||||
target: 'node',
|
||||
format: 'esm',
|
||||
entrypoints: [w('./agent/main.ts')],
|
||||
outdir: w('./dist'),
|
||||
naming: {
|
||||
entry: 'app.js',
|
||||
},
|
||||
define: {},
|
||||
external
|
||||
});
|
||||
|
||||
const cmd = 'dts -i ./agent/main.ts -o /app.d.ts';
|
||||
|
||||
execSync(cmd, { stdio: 'inherit' });
|
||||
|
||||
// Copy package.json to dist
|
||||
Reference in New Issue
Block a user