Skip to content

Commit 6d9c62d

Browse files
committed
Add TypeScript docs
1 parent 64915c3 commit 6d9c62d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,22 @@ npm install vite-svg-loader --save-dev
2222
### Setup
2323

2424
#### `vite.config.js`
25-
2625
```js
2726
import svgLoader from 'vite-svg-loader'
2827

2928
export default {
3029
plugins: [vue(), svgLoader()]
3130
}
3231
```
32+
33+
### Use with TypeScript
34+
If you'd like to use the loader in a TypeScript project, you'll need to add the following type definition to your `tsconfig.json` file:
35+
36+
#### `tsconfig.json`
37+
```json
38+
{
39+
"compilerOptions": {
40+
"types": ["vite-svg-loader", "vite/client"]
41+
}
42+
}
43+
```

0 commit comments

Comments
 (0)