0.1.5 • Published 6 years ago

phantomjs-critical-css-webpack-plugin v0.1.5

Weekly downloads
4
License
MIT
Repository
-
Last release
6 years ago

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
  })
]
...
0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago