Skip to content

gatsbyjs で使ってる web font を Web Font Loader で呼んでみる

Posted on:2019年3月15日 at 00:00

使用バージョン

gatsby-plugin-web-font-loader インストール

npm install --save gatsby-plugin-web-font-loader
    {
      resolve: 'gatsby-plugin-web-font-loader',
      options: {
        google: {
          families: ['Roboto:400,500,700', 'Material+Icons']
        },
      }
    }

import していたものをコメントアウト(別に消しても良い)

- @import url("https://fonts.googleapis.com/css?family=Roboto:400,500,700|Material+Icons");
+ //@import url("https://fonts.googleapis.com/css?family=Roboto:400,500,700|Material+Icons");

参考