Skip to content

Commit 46384b4

Browse files
committed
types fix
1 parent ac135b5 commit 46384b4

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"types": "./dist/index.d.ts",
1818
"scripts": {
1919
"dev": "vite",
20-
"build": "vue-tsc --noEmit && vite build",
20+
"build": "vue-tsc --declaration --emitDeclarationOnly && vite build",
2121
"types": "vue-tsc ",
2222
"preview": "vite preview"
2323
},
@@ -28,14 +28,13 @@
2828
"devDependencies": {
2929
"unplugin-vue-components": "^0.26.0",
3030
"@types/node": "^20.2.5",
31-
"@vitejs/plugin-vue": "^4.2.3",
32-
"@vue/eslint-config-typescript": "11.0.2",
31+
"@vitejs/plugin-vue": "4.5.2",
32+
"@vue/eslint-config-typescript": "12.0.0",
3333
"eslint": "8.28.0",
3434
"eslint-plugin-vue": "9.7.0",
3535
"sass": "^1.69.5",
36-
"typescript": "^5.0.2",
37-
"vite": "^4.3.9",
38-
"vite-plugin-dts": "^3.6.4",
39-
"vue-tsc": "^1.4.2"
36+
"typescript": "^5.3.3",
37+
"vite": "^5.0.10",
38+
"vue-tsc": "^1.8.26"
4039
}
4140
}

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"vue": ["node_modules/vue"],
1717
},
1818
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
19-
"types": ["node"]
19+
"types": ["node"],
20+
"outDir": "dist"
2021
},
2122
"include": [
2223
"vite.config.ts",
@@ -26,5 +27,6 @@
2627
"test/**/*.ts",
2728
"test/**/*.tsx"
2829
],
29-
"exclude": ["node_modules"]
30+
"exclude": ["node_modules"],
31+
"references": [{ "path": "./tsconfig.node.json" }],
3032
}

vite.config.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
import { defineConfig } from "vite";
22
import vue from "@vitejs/plugin-vue";
3-
import dts from "vite-plugin-dts";
43
import Components from "unplugin-vue-components/vite";
54
import path from "path";
6-
import pkg from "./package.json";
75

86
// https://vitejs.dev/config/
97
export default defineConfig({
108
plugins: [
119
vue(),
12-
dts({
13-
entryRoot: "src",
14-
staticImport: true,
15-
compilerOptions: {
16-
skipLibCheck: true,
17-
},
18-
}),
1910
Components({
2011
dts: false,
2112
extensions: ["vue", "ts"],
@@ -29,8 +20,10 @@ export default defineConfig({
2920
name: "TimeBlocksVue",
3021
// the name of the output files when the build is run
3122
fileName: "time-blocks-vue",
23+
formats: ["es"],
3224
},
3325
outDir: "dist",
26+
emptyOutDir: false,
3427
rollupOptions: {
3528
// make sure to externalize deps that shouldn't be bundled
3629
// into your library

0 commit comments

Comments
 (0)