mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-03 02:59:07 +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",
|
"name": "@cherrystudio/ai-core",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Cherry Studio AI Core - Unified AI Provider Interface Based on Vercel AI SDK",
|
"description": "Cherry Studio AI Core - Unified AI Provider Interface Based on Vercel AI SDK",
|
||||||
"main": "src/index.ts",
|
"main": "dist/index.js",
|
||||||
"types": "src/index.ts",
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsc -w",
|
"dev": "tsc -w",
|
||||||
@ -125,14 +125,14 @@
|
|||||||
],
|
],
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./src/index.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./src/index.ts",
|
"import": "./dist/index.mjs",
|
||||||
"require": "./src/index.ts"
|
"require": "./dist/index.js"
|
||||||
},
|
},
|
||||||
"./core/plugins/built-in": {
|
"./core/plugins/built-in": {
|
||||||
"types": "./src/core/plugins/built-in/index.ts",
|
"types": "./dist/core/plugins/built-in/index.d.ts",
|
||||||
"import": "./src/core/plugins/built-in/index.ts",
|
"import": "./dist/core/plugins/built-in/index.mjs",
|
||||||
"require": "./src/core/plugins/built-in/index.ts"
|
"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