vite-plugin-dts 1.7.1 → 1.7.2
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 +20 -8
- package/README.zh-CN.md +317 -305
- package/dist/index.cjs +5 -176434
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +5 -176434
- package/package.json +51 -52
package/README.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">vite-plugin-dts</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
A vite plugin that generates declaration files (<code>*.d.ts</code>) from <code>.ts(x)</code> or <code>.vue</code> source files when using vite in <a href="https://vitejs.dev/guide/build.html#library-mode">library mode</a>.
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/vite-plugin-dts">
|
|
9
|
+
<img src="https://img.shields.io/npm/v/vite-plugin-dts?color=orange&label=" alt="version" />
|
|
10
|
+
</a>
|
|
11
|
+
</p>
|
|
6
12
|
|
|
7
|
-
>
|
|
13
|
+
<p align="center">
|
|
14
|
+
<strong>English</strong> | <a href="./README.zh-CN.md">中文</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center"><strong>Notice: </strong><code>skipDiagnostics</code> option default to <code>false</code> since 1.7.0.</p>
|
|
18
|
+
|
|
19
|
+
<br />
|
|
8
20
|
|
|
9
21
|
## Install
|
|
10
22
|
|
|
@@ -69,7 +81,7 @@ const props = defineProps<{
|
|
|
69
81
|
|
|
70
82
|
Here are some FAQ's and solutions.
|
|
71
83
|
|
|
72
|
-
### Missing some declaration files after build
|
|
84
|
+
### Missing some declaration files after build (before `1.7.0`)
|
|
73
85
|
|
|
74
86
|
By default `skipDiagnostics` option is `true`, which means that type diagnostic will be skipped during the build process (some projects may have diagnostic tools such as `vue-tsc`). If there are some files with type errors which interrupt the build process, these files will not be emitted (declaration files won't be generated).
|
|
75
87
|
|
|
@@ -185,7 +197,7 @@ export interface PluginOptions {
|
|
|
185
197
|
/**
|
|
186
198
|
* Manual set exclude glob
|
|
187
199
|
*
|
|
188
|
-
* Defaults base on your tsconfig.json exclude option, be '
|
|
200
|
+
* Defaults base on your tsconfig.json exclude option, be 'node_modules/**' when empty
|
|
189
201
|
*/
|
|
190
202
|
exclude?: string | string[]
|
|
191
203
|
|
|
@@ -296,10 +308,10 @@ export interface PluginOptions {
|
|
|
296
308
|
Clone and run the following script:
|
|
297
309
|
|
|
298
310
|
```sh
|
|
299
|
-
pnpm run test:
|
|
311
|
+
pnpm run test:ts
|
|
300
312
|
```
|
|
301
313
|
|
|
302
|
-
Then check `
|
|
314
|
+
Then check `examples/ts/types`.
|
|
303
315
|
|
|
304
316
|
## License
|
|
305
317
|
|