mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-10 01:39:25 +00:00
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { fileURLToPath } from 'node:url';
|
|
|
|
import { defineConfig } from 'tsdown';
|
|
|
|
import { rawTextPlugin } from '../../build/raw-text-plugin.mjs';
|
|
|
|
export default defineConfig({
|
|
entry: ['./src/index.ts'],
|
|
format: ['esm'],
|
|
dts: false,
|
|
outDir: 'dist',
|
|
clean: true,
|
|
plugins: [rawTextPlugin()],
|
|
banner: {
|
|
js: [
|
|
"import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';",
|
|
"import { dirname as __cjsShimDirname } from 'node:path';",
|
|
'const __filename = __cjsShimFileURLToPath(import.meta.url);',
|
|
'const __dirname = __cjsShimDirname(__filename);',
|
|
].join('\n'),
|
|
},
|
|
alias: {
|
|
'@moonshot-ai/agent-core': fileURLToPath(new URL('../agent-core/src/index.ts', import.meta.url)),
|
|
'@moonshot-ai/kaos': fileURLToPath(new URL('../kaos/src/index.ts', import.meta.url)),
|
|
'@moonshot-ai/kimi-code-oauth': fileURLToPath(new URL('../oauth/src/index.ts', import.meta.url)),
|
|
'@moonshot-ai/kosong': fileURLToPath(new URL('../kosong/src/index.ts', import.meta.url)),
|
|
},
|
|
deps: {
|
|
alwaysBundle: [/^@moonshot-ai\//],
|
|
neverBundle: [],
|
|
},
|
|
});
|