nuxt-fontawesome

Minimal FontAwesome Nuxt module

Downloads
7
Stars
0
Committers
3

FontAwesome Nuxt module

Minimal FontAwesome Nuxt module.

Features

  • Adds components from vue-fontawesome (vue 3.x)
  • Let nuxt handle css from fontawesome svg

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add @bicou/nuxt-fontawesome

You may have to install more dependencies if you face resolving errors:

npm install --save @fortawesome/vue-fontawesome
npm install --save @fortawesome/fontawesome-svg-core

Install icon packages:

npm install --save @fortawesome/free-solid-svg-icons
npm install --save @fortawesome/free-regular-svg-icons
npm install --save @fortawesome/free-brands-svg-icons

You can now use the font-awesome-icon component in your nuxt pages:

<template>
  <font-awesome-icon :icon="faMusic" />
</template>

<script setup lang="ts">
import { faMusic } from '@fortawesome/free-solid-svg-icons/faMusic'
</script>

Contribution

# 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