Skip to content

Commit

Permalink
chore(client): add component declaration rollup config (#2032)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiyang Sun authored Aug 12, 2023
1 parent f1eb2d9 commit 826737b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"default": "./dist/api.mjs"
},
"./component": {
"default": "./dist/component.mjs"
"default": "./dist/component.mjs",
"types": "./dist/component.d.ts"
},
"./full": {
"types": "./dist/waline.d.ts",
Expand Down Expand Up @@ -59,7 +60,8 @@
"default": "./dist/api.mjs"
},
"./dist/component": {
"default": "./dist/component.mjs"
"default": "./dist/component.mjs",
"types": "./dist/component.d.ts"
},
"./dist/comment": {
"types": "./dist/comment.d.ts",
Expand Down
10 changes: 9 additions & 1 deletion packages/client/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,15 @@ export default [
},

// components declaration files
// TODO: Generate declaration files
{
input: './src/entries/components.ts',
output: [
{ file: './dist/component.d.cts', format: 'esm' },
{ file: './dist/component.d.mts', format: 'esm' },
{ file: './dist/component.d.ts', format: 'esm'}
],
plugins: [vue(), ts(), dts({ compilerOptions: { preserveSymlinks: false } })],
},

// api
{
Expand Down

0 comments on commit 826737b

Please sign in to comment.