mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-27 21:01:32 +08:00
chore: update package.json and add tsdown configuration for build process
- Changed the main and types entries in package.json to point to the dist directory for better output management. - Added a new tsdown.config.ts file to define the build configuration, specifying entry points, output directory, and formats for the project.
This commit is contained in:
parent
ef8cf65ece
commit
4732c8f1bd
@ -2,8 +2,8 @@
|
||||
"name": "@cherrystudio/ai-core",
|
||||
"version": "1.0.0",
|
||||
"description": "Cherry Studio AI Core - Unified AI Provider Interface Based on Vercel AI SDK",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsdown",
|
||||
"dev": "tsc -w",
|
||||
@ -125,14 +125,14 @@
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"import": "./src/index.ts",
|
||||
"require": "./src/index.ts"
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./core/plugins/built-in": {
|
||||
"types": "./src/core/plugins/built-in/index.ts",
|
||||
"import": "./src/core/plugins/built-in/index.ts",
|
||||
"require": "./src/core/plugins/built-in/index.ts"
|
||||
"types": "./dist/core/plugins/built-in/index.d.ts",
|
||||
"import": "./dist/core/plugins/built-in/index.mjs",
|
||||
"require": "./dist/core/plugins/built-in/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
packages/aiCore/tsdown.config.ts
Normal file
13
packages/aiCore/tsdown.config.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({
|
||||
entry: {
|
||||
index: 'src/index.ts',
|
||||
'core/plugins/built-in/index': 'src/core/plugins/built-in/index.ts'
|
||||
},
|
||||
outDir: 'dist',
|
||||
format: ['esm', 'cjs'],
|
||||
clean: true,
|
||||
dts: true,
|
||||
tsconfig: 'tsconfig.json'
|
||||
})
|
||||
Loading…
Reference in New Issue
Block a user