2024-08-04 08:28:19 +08:00
|
|
|
import { defineConfig, moduleTools } from '@modern-js/module-tools';
|
2024-10-21 16:30:07 +08:00
|
|
|
import { version } from './package.json';
|
2024-07-23 16:25:11 +08:00
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [moduleTools()],
|
|
|
|
buildPreset: 'npm-library',
|
2024-11-07 11:29:50 +08:00
|
|
|
buildConfig: {
|
2025-03-09 21:50:20 +08:00
|
|
|
input: {
|
|
|
|
index: 'src/index.ts',
|
|
|
|
utils: 'src/utils.ts',
|
|
|
|
tree: 'src/tree.ts',
|
|
|
|
'ai-model': 'src/ai-model/index.ts',
|
|
|
|
},
|
2025-07-05 15:28:13 +08:00
|
|
|
externals: ['langsmith', '@midscene/shared'],
|
2025-03-07 17:20:18 +08:00
|
|
|
target: 'es2020',
|
2024-11-07 11:29:50 +08:00
|
|
|
define: {
|
|
|
|
__VERSION__: version,
|
|
|
|
},
|
2025-01-13 14:32:17 +08:00
|
|
|
splitting: true,
|
2025-02-08 14:38:04 +08:00
|
|
|
sourceMap: true,
|
2025-03-09 21:50:20 +08:00
|
|
|
dts: {
|
|
|
|
respectExternal: true,
|
|
|
|
},
|
2024-11-07 11:29:50 +08:00
|
|
|
},
|
2024-07-23 16:25:11 +08:00
|
|
|
});
|