Skip to content

Gatsby plugin that disables Font Awesome auto CSS insertion and instead inserts it at compile time.

Notifications You must be signed in to change notification settings

jzabala/gatsby-plugin-fontawesome-css

Repository files navigation

gatsby-plugin-fontawesome-css

Disables Font Awesome auto CSS insertion and instead inserts it at compile time.

Why

Go to this Gatsby example site with Font Awesome icons. On the initial load, the page will jump. This is more clear if you disable JavaScript and reload the page. The problem is that Font Awesome inserts its styles in the frontend.

Install

First, follow Font Awesome docs to add it to your app.

Second, install the plugin:

yarn add gatsby-plugin-fontawesome-css

or

npm install --save gatsby-plugin-fontawesome-css

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [`gatsby-plugin-fontawesome-css`],
}

About

Gatsby plugin that disables Font Awesome auto CSS insertion and instead inserts it at compile time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •