@bolt/critical-css-webpack-plugin
Bolt Design System fork of the Critical CSS Webpack Plugin
Last updated a month ago by sghoweri .
MIT · Original npm · Tarball · package.json
$ cnpm install @bolt/critical-css-webpack-plugin 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.21.0-canary.12352.5.0                                ...           canary (13 hours ago)
  • 2.19.0                                ...           latest (a month ago)
  • 2.8.0-beta.1                                ...           next (7 months ago)

197 Versions

Downloads
Today 18
This Week 66
This Month 55
Last Day 12
Last Week 84
Last Month 326
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |