Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Nuxt.js + VuetifyでFontAwesomeを使用する

Nuxt.jsでVuetifyを使用するときに、Vue.jsのときのようにplugins/vuetify.jsがなくどこで設定すればいいのか迷ったのでメモ。

FontAweSomeをインストール

ここは公式通り。

yarn add @fortawesome/fontawesome-free -D
// OR 
npm install @fortawesome/fontawesome-free -D

nuxt.config.jsに追加

nuxt.config.jsvuetifyに以下を追加

nuxt.config.js
   vuetify: { 
++   defaultAssets: {icons: 'fa'}
     customVariables: ['~/assets/variables.scss'], 
     theme: { 
      dark: true, 
       themes: { 
         dark: { 
           primary: colors.blue.darken2, 
           accent: colors.grey.darken3, 
           secondary: colors.amber.darken3, 
           info: colors.teal.lighten1, 
           warning: colors.amber.base, 
           error: colors.deepOrange.accent4, 
           success: colors.green.accent3 
         } 
       } 
     } 
   }, 

これでOK。

<v-icon>fas fa-pen</v-icon>
azukiazusa
フィットボクシングも始めました。
https://sapper-blog-app.vercel.app/blog
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away