Skip to content

Commit 0ad1674

Browse files
authored
doc: update usage for nuxt 3
1 parent 7d804c3 commit 0ad1674

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/svg-sprite/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/svg-sprite)
44
[![npm](https://img.shields.io/npm/dt/@nuxtjs/svg-sprite.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/svg-sprite)
55

6-
> Optimized and Easy way to use SVG files in Nuxt.js
6+
> Optimized and Easy way to use SVG files in Nuxt
77
88
Sprites help increase speed, maintain a consistent development workflow, and make the creation of icons much faster. SVG sprites are typically created using icons of a similar shape or form whereas larger scale graphics are one-off applications.
99

@@ -23,17 +23,17 @@ npm i @nuxtjs/svg-sprite
2323

2424
## Usage
2525

26-
Add `@nuxtjs/svg-sprite` to buildModules section of `nuxt.config.js`:
26+
Add `@nuxtjs/svg-sprite` to modules section of `nuxt.config`:
2727

28-
```js
29-
{
30-
buildModules: [
28+
```ts
29+
export default defineNuxtConfig({
30+
modules: [
3131
'@nuxtjs/svg-sprite',
3232
],
3333
svgSprite: {
3434
// manipulate module options
3535
}
36-
}
36+
})
3737
```
3838

3939
Place your svg files in `~/assets/sprite/svg/`, say `sample.svg` and use your image with globally registered `svg-icon` component:

0 commit comments

Comments
 (0)