Socket
Book a DemoInstallSign in
Socket

critical-css-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

critical-css-webpack-plugin

Critical-Css-Webpack-Plugin ======================= > webpack plugin for critical css, based on [critical](https://github.com/addyosmani/critical), with publicPath supportive.

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
1
Created
Source

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',
  target: 'index.html',
  inline: true,
  extract: true,
  width: 375,
  height: 565,
  css: [/* all css assets emit by webpack */]
}

You pass options to overwrite default value.

webpack.config.js

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

FAQs

Package last updated on 25 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.