@vizejs/vite-plugin 0.130.0 → 0.132.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ Install `vp` once from the [Vite+ install guide](https://viteplus.dev/guide/inst
18
18
  vp install -D @vizejs/vite-plugin
19
19
  ```
20
20
 
21
- Add `vize` as a direct dependency only if your project imports shared config helpers from `"vize"` (see [Shared Config](../docs/content/guide/vite-plugin.md#shared-config)).
21
+ Add `vize` as a direct dependency only if your project imports shared config helpers from `"vize"` (see [Shared Config](https://github.com/ubugeeei/vize/blob/main/docs/content/guide/vite-plugin.md#shared-config)).
22
22
 
23
23
  ## Usage
24
24
 
@@ -38,6 +38,31 @@ export default defineConfig({
38
38
  });
39
39
  ```
40
40
 
41
+ ### TypeScript
42
+
43
+ Add `@vizejs/vite-plugin` to `compilerOptions.types` so TypeScript can resolve direct `.vue`
44
+ imports without a project-local `env.d.ts` shim:
45
+
46
+ ```json
47
+ {
48
+ "compilerOptions": {
49
+ "types": ["vite/client", "@vizejs/vite-plugin"]
50
+ }
51
+ }
52
+ ```
53
+
54
+ This does not require adding `vize` as a direct project dependency.
55
+
56
+ For Vite Plus projects, keep `vite-plus/client` and append `@vizejs/vite-plugin`:
57
+
58
+ ```json
59
+ {
60
+ "compilerOptions": {
61
+ "types": ["vite-plus/client", "@vizejs/vite-plugin"]
62
+ }
63
+ }
64
+ ```
65
+
41
66
  ### Shared config
42
67
 
43
68
  `vize.config.ts`
package/client.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ declare module "*.vue" {
2
+ import type { DefineComponent } from "vue";
3
+
4
+ const component: DefineComponent<{}, {}, any>;
5
+ export default component;
6
+ }
package/index.d.mts ADDED
@@ -0,0 +1,4 @@
1
+ import "./client.d.ts";
2
+
3
+ export { default } from "./dist/index.mjs";
4
+ export * from "./dist/index.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/vite-plugin",
3
- "version": "0.130.0",
3
+ "version": "0.132.0",
4
4
  "description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
5
5
  "keywords": [
6
6
  "compiler",
@@ -22,24 +22,26 @@
22
22
  "directory": "npm/vite-plugin-vize"
23
23
  },
24
24
  "files": [
25
+ "client.d.ts",
26
+ "index.d.mts",
25
27
  "dist"
26
28
  ],
27
29
  "type": "module",
28
30
  "main": "./dist/index.mjs",
29
- "types": "./dist/index.d.mts",
31
+ "types": "./index.d.mts",
30
32
  "exports": {
31
33
  ".": {
32
- "import": "./dist/index.mjs",
33
- "types": "./dist/index.d.mts"
34
+ "types": "./index.d.mts",
35
+ "import": "./dist/index.mjs"
34
36
  }
35
37
  },
36
38
  "publishConfig": {
37
39
  "access": "public"
38
40
  },
39
41
  "dependencies": {
40
- "@vizejs/native": "0.130.0",
42
+ "@vizejs/native": "0.132.0",
41
43
  "tinyglobby": "0.2.16",
42
- "vize": "0.130.0"
44
+ "vize": "0.132.0"
43
45
  },
44
46
  "devDependencies": {
45
47
  "@types/node": "25.7.0",