Skip to content

Commit 2b0a993

Browse files
authored
docs: add Vue components typechecking instructions (#35)
1 parent 3169d6b commit 2b0a993

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,22 @@ setting "generateTrace" compiler option. This is an instruction from [microsoft/
222222

223223
You must both set "incremental": true in your `tsconfig.json` (under `compilerOptions`) and also specify mode: 'write-references' in `TsCheckerRspackPlugin` settings.
224224

225+
## Vue components
226+
227+
To enable typecheck in `.vue` files, use the custom TypeScript wrapper [`@esctn/vue-tsc-api`](https://www.npmjs.com/package/@esctn/vue-tsc-api). It works on top of [`vue-tsc`](https://www.npmjs.com/package/vue-tsc) — a popular CLI tool for type-checking Vue 3 code.
228+
229+
```bash
230+
npm add @esctn/vue-tsc-api -D
231+
```
232+
233+
```js
234+
new TsCheckerRspackPlugin({
235+
typescript: {
236+
typescriptPath: '@esctn/vue-tsc-api',
237+
},
238+
});
239+
```
240+
225241
## License
226242

227243
MIT License

0 commit comments

Comments
 (0)