Skip to content

Commit

Permalink
Add TypeScript docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkleemans committed Jan 20, 2021
1 parent 64915c3 commit 6d9c62d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,22 @@ npm install vite-svg-loader --save-dev
### Setup

#### `vite.config.js`

```js
import svgLoader from 'vite-svg-loader'

export default {
plugins: [vue(), svgLoader()]
}
```

### Use with TypeScript
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:

#### `tsconfig.json`
```json
{
"compilerOptions": {
"types": ["vite-svg-loader", "vite/client"]
}
}
```

0 comments on commit 6d9c62d

Please sign in to comment.