Stakit transform to inline critical, csso
optimized CSS using dropcss
.
npm i stakit-critical-css
var stakit = require('stakit')
var inlineCriticalCSS = require('stakit-critical-css')
var app = require('.')
stakit()
.use(stakit.copy([ 'style.css' ])) // or get it from stakit-postcss
.transform(inlineCriticalCSS, { src: 'style.css' })
.output()
Concats the stream of the file at opts.src
and uses that as the raw CSS. Returns a hstream
transform that prepends the optimized critical CSS to the head in a <style>
tag.