rans>Skip to main content
Community Plugin
View plugin on GitHub
See starters using this

gatsby-plugin-minify

NPM Downloads NPM Version License Dependency Status devDependency Status Code Style

A Gatsby plugin to easily minify all result.

Installation

$ yarn add gatsby-plugin-minify

# or npm
$ npm install gatsby-plugin-minify

Usage

Include the plugin in your gatsby-config.js file.

plugins: [`gatsby-plugin-minify`]

options

If you need to pass options to html-minifier use the plugins options, see html-minifier docs for all available options.

// in gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-minify`,
    options: {
      removeAttributeQuotes: true
      // ...
    }
  }
]

Contributing

  1. Fork it on GitHub!
  2. Clone the fork to your own machine.
  3. Checkout your feature branch: git checkout -b my-awesome-feature
  4. Commit your changes to your own branch: git commit -am 'Add some feature'
  5. Push your work back up to your fork: git push -u origin my-awesome-feature
  6. Submit a Pull Request so that we can review your changes.

NOTE: Be sure to merge the latest from “upstream” before making a pull request!

License

MIT © 汪磊

Docs
Tutorials
Plugins
Blog
Showcase