0.0.6 • Published 4 years ago
@codefixlabs/google-fonts v0.0.6
@codefixlabs/google-fonts
Features
- 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
Setup
Nuxt 3
- Add
@codefixlabs/google-fontsdependency to your project
yarn add --dev @codefixlabs/google-fonts
# or
npm install --save-dev @codefixlabs/google-fonts- Add
@codefixlabs/google-fontsto thebuildModulessection ofnuxt.config.ts
import { defineNuxtConfig } from 'nuxt3'
export default defineNuxtConfig({
buildModules: [
// Simple usage
'@codefixlabs/google-fonts',
// With options
['@codefixlabs/google-fonts', { /* module options */ }]
]
})Typescript
For Nuxt config typescript support, add the module within your tsconfig.json.
{
"compilerOptions": {
"types": [
"@codefixlabs/google-fonts"
]
}
}Development
- Clone this repository
- Install dependencies using
yarn installornpm install - Start development server using
yarn devornpm run dev
License
Copyright © CodeFix Team