Skip to content

youfoundron/gatsby-plugin-purify-css

Repository files navigation

Gatsby Plugin PurifyCSS

JavaScript Style Guide npm version dependencies Status devDependencies Status
As featured in Gatsby's community plugins.
A Gatsby post-build plugin that implements PurifyCSS.
Never worry about the size of your css framework again!
Updates your html files directly, removing any unused inline styles.

Gatsby 2

This plugin does not (currently) work with Gatsby 2. The purgecss plugin does and might be a suitable alternative.

Install

$ npm install gatsby-plugin-purify-css

Usage

In your gatsby-config.js file:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-purify-css',
      options: {
        /* Defaults */
        styleId: 'gatsby-inlined-css',
        purifyOptions: {
          info: true,
          minify: true
        }
      }
    }
  ]
}

Options

PurifyCSS options are documented here.

About

Gatsby plugin for removing unused CSS in production.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published