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

docs: added nuxt@>3 instructions #23

merged 1 commit into from
Jul 21, 2022

Conversation

shorwood
Copy link
Contributor

If it is of any help, here is a PR extending the Readme for anyone that might have want to use this plugin with nuxt@3

Added part

If using nuxt@>3 or nuxt-edge, you can leverage the virtual file system to import the generated CSS.

// 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 */}),
    ],
  },
})

@stafyniaksacha stafyniaksacha merged commit f6273c4 into cssninjaStudio:main Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants