Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsanos committed May 5, 2023
1 parent aaa529a commit 1184afa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ import iconRaw from './my-icon.svg?raw'
```

### Component
SVGs can be explicitly imported as Vue components using the `?component` suffix:
SVGs can be explicitly imported as Vue components using the `?inline` suffix:
```js
import IconComponent from './my-icon.svg?component'
import IconComponent from './my-icon.svg?inline'
// <IconComponent />
```

Expand Down Expand Up @@ -94,7 +94,7 @@ import IconWithoutOptimizer from './my-icon.svg?skipsvgo'
```

### Use with TypeScript
If you use the loader in a Typescript project, you'll need to import your svg files with the `?component` param: `import MyIcon from './my-icon.svg?component'`.
If you use the loader in a Typescript project, you'll need to import your svg files with the `?inline` param: `import MyIcon from './my-icon.svg?inline'`.

You'll also need to reference the type definitions:
```ts
Expand Down

0 comments on commit 1184afa

Please sign in to comment.