[Nuxt.js] headタグはどこにあるのか

はじめに

今回は、FontAwesomeを使用しようと思った際にheadタグどこ?となったので備忘録

結論

nuxt.config.jsにある

export default {
  mode: 'universal',
  /*
  ** Headers of the page
  */
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
      { rel: 'stylesheet', href: 'https://use.fontawesome.com/releases/v5.6.1/css/all.css'}
    ]
  },

ここにheadなり、titleなりあるのでまとめて記述して反映させてあげる。

今回の場合は、下記の箇所を追加した

    link: [
  //ここ追加
      { rel: 'stylesheet', href: 'https://use.fontawesome.com/releases/v5.6.1/css/all.css'}
    ]