Skip to content

Commit ad8c254

Browse files
committed
build: fix missing declaration
1 parent 19d5ffd commit ad8c254

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"scripts": {
2525
"dev": "vite --mode docs",
2626
"build:docs": "vite build --mode docs",
27-
"build:lib": "vite build --mode lib && vue-tsc",
27+
"build:lib": "vite build --mode lib && vue-tsc -p tsconfig.build.json",
2828
"preview": "vite preview",
2929
"release": "pnpm dlx changelogen@latest --release --push --publish",
3030
"prerelease": "pnpm run build:lib"
@@ -33,6 +33,7 @@
3333
"@antfu/eslint-config": "^2.12.2",
3434
"@iconify-json/carbon": "^1.1.31",
3535
"@iconify-json/mdi": "^1.1.65",
36+
"@types/clean-css": "^4.2.11",
3637
"@types/node": "^18.19.30",
3738
"@unocss/eslint-plugin": "^0.59.0",
3839
"@unocss/reset": "^0.59.0",
@@ -59,4 +60,4 @@
5960
"isarray": "npm:@nolyfill/isarray@latest"
6061
}
6162
}
62-
}
63+
}

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.build.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "@vue/tsconfig/tsconfig.dom.json",
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"moduleResolution": "Bundler",
6+
"declaration": true,
7+
"emitDeclarationOnly": true,
8+
"noEmit": false,
9+
"outDir": "lib"
10+
},
11+
"vueCompilerOptions": {
12+
"skipTemplateCodegen": true
13+
},
14+
"include": [
15+
"packages/**/*.ts",
16+
"packages/**/*.d.ts",
17+
"packages/**/*.tsx",
18+
"packages/**/*.vue"
19+
]
20+
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"references": [{ "path": "./tsconfig.node.json" }],
1313
"include": [
14+
"vite.config.ts",
1415
"src/**/*.ts",
1516
"src/**/*.d.ts",
1617
"src/**/*.tsx",

tsconfig.node.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"compilerOptions": {
33
"composite": true,
4-
"target": "ESNext",
54
"module": "ESNext",
6-
"moduleResolution": "Node",
5+
"moduleResolution": "Bundler",
76
"allowSyntheticDefaultImports": true
87
},
98
"include": ["vite.config.ts"]

vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export default defineConfig(({ command: _command, mode }) => {
5454
{
5555
format: 'es',
5656
entryFileNames: `vue-modern-cropper.mjs`,
57-
preserveModules: false,
5857
},
5958
],
6059
},

0 commit comments

Comments
 (0)