使用バージョン
- “npm”: 6.8.0
- “gatsby”: “2.0.91”,
- “gatsby-cli”: “^2.4.15”,
- “gatsby-plugin-web-font-loader”: “^1.0.4”,
gatsby-plugin-web-font-loader インストール
- command line
npm install --save gatsby-plugin-web-font-loader
- gatsby-config.js
{
resolve: 'gatsby-plugin-web-font-loader',
options: {
google: {
families: ['Roboto:400,500,700', 'Material+Icons']
},
}
}
- index.scss
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");