This package has been deprecated

Author message:

The module 'gatsby-plugin-brotli' now uses Node.js built-in brotli compression functions starting with v2.0.0, please use it over 'gatsby-plugin-iltorb'

gatsby-plugin-iltorb

1.0.0 • Public • Published

gatsby-plugin-iltorb

Travis Codacy Badge Known Vulnerabilities Coverage Status Greenkeeper badge js-standard-style

Gatsby plugin for preparing brotli-compressed versions of assets using iltorb native bindings.

Note: This means that the plugin will try to download the binaries for your system. If it fails, it tries to build them using build tools that must already exist on the system. There is also a version of this plugin available, that does not use native bindings (gatsby-plugin-brotli). The difference is that compression takes a bit longer.

/webpack-runtime-cde5506958f1afc4d89e.js

becomes

/webpack-runtime-cde5506958f1afc4d89e.js.br

Requirements

This plugin will only generate the compressed files. To see them been served to the client, your Gatsby website should run on a production server that supports Brotli .br-files. The Gatsby development server does not serve the compressed versions.

Installation

With npm:

npm install --save gatsby-plugin-iltorb

Or with Yarn:

yarn add gatsby-plugin-iltorb

Usage

In your gatsby-config.js file add:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-iltorb'
    }
  ]
}

By default, only .css and .js files are compressed, but you can override this with the extensions option.

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-iltorb',
      options: {
        extensions: ['css', 'html', 'js', 'svg']
      }
    }
  ]
}

You can even place all the brotli-compressed files (only the brotli ones, the uncompressed ones will be saved in the public directory as usual) in a dedicated directory (ex. public/brotli):

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-iltorb',
      options: {
        path: 'brotli'
      }
    }
  ]
}

Maintainers

Osmond van Hemert Github Web

Contributing

If you would like to help out with some code, check the details.

Not a coder, but still want to support? Have a look at the options available to donate.

Sponsors

BrowserStack

License

Licensed under MIT.

NOTE: This plugin only generates output when run in production mode! To test, run: gatsby build && gatsby serve

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i gatsby-plugin-iltorb

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

26.8 kB

Total Files

14

Last publish

Collaborators

  • ovhemert