Skip to content

Commit

Permalink
fix: correct retrun type
Browse files Browse the repository at this point in the history
  • Loading branch information
mdunisch committed Jul 3, 2022
1 parent acf19b6 commit 0c7e9dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -57,8 +57,8 @@ import IconComponent from './my-icon.svg?component'
### Skip SVGO Optimizer for a file
SVGO can be explicitly disabled for one file by adding the `?skipsvgo` suffix:
```js
import iconWithoutOptimizer from './my-icon.svg?skipsvgo'
// '/assets/my-icon.2d8efhg.svg'
import IconWithoutOptimizer from './my-icon.svg?skipsvgo'
// <IconWithoutOptimizer />
```

### Default import config
Expand Down
5 changes: 3 additions & 2 deletions index.d.ts
@@ -1,3 +1,5 @@
import { FunctionalComponent, SVGAttributes } from 'vue'

declare module 'vite-svg-loader' {
import { Plugin } from 'vite'
import { OptimizeOptions } from 'svgo'
Expand All @@ -6,7 +8,6 @@ declare module 'vite-svg-loader' {
}

declare module '*.svg?component' {
import { FunctionalComponent, SVGAttributes } from 'vue'
const src: FunctionalComponent<SVGAttributes>
export default src
}
Expand All @@ -22,6 +23,6 @@ declare module '*.svg?raw' {
}

declare module '*.svg?skipsvgo' {
const src: string
const src: FunctionalComponent<SVGAttributes>
export default src
}

0 comments on commit 0c7e9dd

Please sign in to comment.