Skip to content

Commit c6ea5f6

Browse files
authored
chore: added nuxt@>3 instructions
1 parent 7d69527 commit c6ea5f6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ Only needed if using local/custom fonts
3232
import 'virtual:fonts.css'
3333
```
3434

35+
If using `nuxt@>3` or `nuxt-edge`, you can leverage the virtual file system to import the generated CSS.
36+
```ts
37+
// nuxt.config.ts
38+
import { defineNuxtConfig } from 'nuxt'
39+
import Fonts from 'vite-plugin-fonts'
40+
41+
export default defineNuxtConfig({
42+
css: [
43+
'virtual:fonts.css',
44+
],
45+
vite: {
46+
plugins: [
47+
Fonts({ /** vite-plugin-fonts config */}),
48+
],
49+
},
50+
})
51+
```
52+
3553
## Options
3654

3755
```ts

0 commit comments

Comments
 (0)