Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: added nuxt@>3 instructions #23

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ Only needed if using local/custom fonts
import 'virtual:fonts.css'
```

If using `nuxt@>3` or `nuxt-edge`, you can leverage the virtual file system to import the generated CSS.
```ts
// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt'
import Fonts from 'vite-plugin-fonts'

export default defineNuxtConfig({
css: [
'virtual:fonts.css',
],
vite: {
plugins: [
Fonts({ /** vite-plugin-fonts config */}),
],
},
})
```

## Options

```ts
Expand Down