Skip to content

Instantly share code, notes, and snippets.

@oskarrough
Created October 7, 2017 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oskarrough/c9895062be3f3d4928e3b8c3b460400a to your computer and use it in GitHub Desktop.
Save oskarrough/c9895062be3f3d4928e3b8c3b460400a to your computer and use it in GitHub Desktop.
1. yarn add critical --dev
2. copy paste this npm script
```
"scripts": {
"critical-css": "cat dist/index.html | critical --base dist/ --inline --minify > index.tmp && mv index.tmp dist/index.html"
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment