Google Fonts module for NuxtJS
- Specify fonts by name/variant
- Parse head links to Google Fonts
- Creates only an external link to Google Fonts
- Support CSS API v2
- Add dns-prefetch
- Add preconnect
- Add preload
- Download css/fonts to local project (No need external resources)
- Encode fonts to base64
- Add
@nuxtjs/google-fonts
dependency to your project
yarn add --dev @nuxtjs/google-fonts # or npm install --save-dev @nuxtjs/google-fonts
- Add
@nuxtjs/google-fonts
to thebuildModules
section ofnuxt.config.js
{
buildModules: [
// Simple usage
'@nuxtjs/google-fonts',
// With options
['@nuxtjs/google-fonts', { /* module options */ }]
]
}
dependency
(No --dev
or --save-dev
flags) and use modules
section in nuxt.config.js
instead of buildModules
.
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
yarn dev
ornpm run dev
Copyright (c) Nuxt Community