Bunny Fonts for Nuxt 3
Check out all the fonts you can use at Bunny Fonts
- Easily use Bunny Fonts
- Automatically injects the Bunny Fonts stylesheet
- Allows for infinite fonts
- Add
nuxt-bunny-fonts
dependency to your project
# Using yarn
yarn add --dev nuxt-bunny-fonts
# Using pnpm
pnpm add -D nuxt-bunny-fonts
# Using npm
npm install --save-dev nuxt-bunny-fonts
- Add
nuxt-bunny-fonts
to themodules
section ofnuxt.config.ts
export default defineNuxtConfig({
modules: [
'nuxt-bunny-fonts'
],
bunnyFonts: {
families: {
Montserrat: [300, 400, 700],
}
}
})
That's it! You can now use Nuxt Bunny Fonts in your Nuxt app ✨
Migrating from google-fonts to bunny-fonts is easy:
- Remove
@nuxtjs/google-fonts
from yourmodules
section ofnuxt.config.ts
- Add
nuxt-bunny-fonts
to yourmodules
section ofnuxt.config.ts
- Change the
googleFonts
property tobunnyFonts
in yournuxt.config.ts
export default defineNuxtConfig({
modules: [
- '@nuxtjs/google-fonts',
+ 'nuxt-bunny-fonts'
],
- googleFonts: {
+ bunnyFonts: {
families: {
Montserrat: [300, 400, 700],
}
}
})
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release