@bolt/critical-css-webpack-plugin

5.0.0 • Public • Published

Critical-Css-Webpack-Plugin

webpack plugin for critical css, based on critical, with publicPath supportive.

Installation

$ yarn add critical-css-webpack-plugin --dev

Usage

webpack.config.js

const CriticalCssPlugin = require('critical-css-webpack-plugin')

...
plugins: [
  new CriticalCssPlugin()
]
...

Options

same as critical options

default options

{
  base: {webpack.output.path},
  src: 'index.html',
  dest: 'index.html',
  inline: true,
  minify: true,
  extract: true,
  width: 375,
  height: 565,
  penthouse: {
    blockJSRequests: false
  }
}

You pass options to overwrite default value.

webpack.config.js

...
plugins: [
  new CriticalCssPlugin({
    // your options
  })
]
...

Readme

Keywords

none

Package Sidebar

Install

npm i @bolt/critical-css-webpack-plugin

Weekly Downloads

55

Version

5.0.0

License

MIT

Unpacked Size

7.91 kB

Total Files

5

Last publish

Collaborators

  • mikemai2awesome
  • evanlovely
  • remydenton
  • dmorse
  • colbycook