Skip to content

Commit 2eb0543

Browse files
committed
deps: update deps
changed back to old way of building types
1 parent 4a30d3d commit 2eb0543

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"typedoc": "^0.24.8",
9292
"typescript": "^5.1.6",
9393
"vite": "^4.4.4",
94-
"vite-plugin-dts": "^3.3.1",
9594
"vite-plugin-externalize-deps": "^0.7.0",
9695
"vite-tsconfig-paths": "^4.2.0",
9796
"vitest": "^0.33.0"

vite.config.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ import { run } from "@alanscodelog/utils/node"
22
import glob from "fast-glob"
33
import path from "path"
44
import type { PluginOption } from "vite"
5-
import dts from "vite-plugin-dts"
65
import { externalizeDeps } from "vite-plugin-externalize-deps"
76
import tsconfigPaths from "vite-tsconfig-paths"
87
import { defineConfig } from "vitest/config"
98

109

11-
const typesPlugin = ({ fixOnly }: { fixOnly: boolean }): PluginOption => ({
10+
const typesPlugin = (): PluginOption => ({
1211
name: "typesPlugin",
1312
// eslint-disable-next-line no-console
14-
writeBundle: async () => run(`npm run build:types${fixOnly ? ":fix" : ""}`).promise.catch(e => console.log(e)).then(() => undefined),
13+
writeBundle: async () => run(`npm run build:types`).promise.catch(e => console.log(e)).then(() => undefined),
1514
})
1615

1716
// https://vitejs.dev/config/
@@ -21,15 +20,8 @@ export default async ({ mode }: { mode: string }) => defineConfig({
2120
externalizeDeps(),
2221
// even if we don't use aliases, this is needed to get imports based on baseUrl working
2322
tsconfigPaths(),
24-
// generates types for ts/vue files
25-
// if only using ts, can be removed and build:types script used instead
26-
dts({
27-
entryRoot: "src",
28-
tsconfigPath: "./tsconfig.types.json",
29-
}),
30-
// fixes alias and baseUrl imports in the generated types
31-
// cannot be removed because dts is not compatible with tsconfigPaths
32-
typesPlugin({ fixOnly: true }),
23+
// runs build:types script which takes care of generating types and fixing type aliases and baseUrl imports
24+
typesPlugin(),
3325
],
3426
build: {
3527
outDir: "dist",

0 commit comments

Comments
 (0)