Skip to content

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.

2 participants