npm i @nuxtjs/google-fonts
{
"devDependencies": {
"nuxt": "3.0.0-rc.13",
"sass": "^1.56.1"
},
"dependencies": {
"@nuxtjs/google-fonts": "^3.0.0-1"
}
}
export default defineNuxtConfig({
css: [
"~/assets/scss/main.scss"
],
modules: [
['@nuxtjs/google-fonts', {
families: {
'Nunito': true,
download: true,
inject: true
}
}]
]
})
If you're also using the CSS Toolkit, you may have to use !important to get it to work.
body {
font-family: "Nunito" ;
}
https://fonts.google.com/
https://www.npmjs.com/package/@nuxtjs/google-fonts