File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,24 @@ Only needed if using local/custom fonts
32
32
import ' virtual:fonts.css'
33
33
```
34
34
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
+
35
53
## Options
36
54
37
55
``` ts
Original file line number Diff line number Diff line change 21
21
"lint:fix" : " eslint --fix ."
22
22
},
23
23
"peerDependencies" : {
24
- "vite" : " ^2.0.0"
24
+ "vite" : " ^2.0.0 || ^3.0.0 "
25
25
},
26
26
"dependencies" : {
27
27
"fast-glob" : " ^3.2.11"
You can’t perform that action at this time.
0 commit comments