Skip to content

egoist/saber-plugin-critical

Repository files navigation

saber-plugin-critical

NPM version NPM downloads CircleCI donate

Introduction

This plugin extracts & inlines critical-path (above-the-fold) CSS from HTML after saber generate, for example if you're using Tailwind CSS or other CSS frameworks you can use this plugin to remove unused CSS.

Install

yarn add saber-plugin-critical --dev

Usage

In your saber-config.yml (or .js, .toml etc):

plugins:
  - resolve: saber-plugin-critical

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

saber-plugin-critical © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).

Website · GitHub @EGOIST · Twitter @_egoistlily