Beasties
Build plugin that inlines a page's critical CSS and lazy-loads the rest of its stylesheets.
Beasties is a Node module that inlines the critical CSS of a page into its HTML and lazy-loads the rest of the stylesheets. It reads the markup and the CSS and keeps the rules that match, without rendering the page in a headless browser. According to its README, this means it inlines every CSS rule the document uses, not only the rules needed above the fold.
It is installed as a development dependency and called from a build step. The same repository publishes beasties-webpack-plugin for webpack and vite-plugin-beasties for Vite, which run the module inside those builds. The README also describes a split into a build-time compiler and a runtime processor for server-rendered pages, where the processor is created once and reused.
Beasties is a maintained fork of critters. The preload strategy for the deferred stylesheets is one of its options.
Worth knowing
The README offers data-beasties-container attributes to limit the markup it evaluates.
Identity
- Status
- Active
- Maintainer
- Daniel Roe3
- Maintained by
- Individual
- First release
- 20245
Rendering and deploy
Releases
Adoption
Sources
- 2026-10-28: links, Written in, License, GitHub stars
api.github.com/repos/danielroe/beasties - 2026-10-28: links, Categories, Install with, Runs as
github.com/danielroe/beasties/blob/main/packages/beasties/README.md - 2026-10-28: Maintainer, License model
raw.githubusercontent.com/danielroe/beasties/main/LICENSE - 2026-10-28: Runtime, Minimum runtime
raw.githubusercontent.com/danielroe/beasties/v0.5.5/packages/beasties/package.json - 2026-10-28: First release
api.github.com/repos/danielroe/beasties/releases - 2026-10-28: Current major version, Last release
api.github.com/repos/danielroe/beasties/releases/latest - 2026-10-28: Contributors
api.github.com/repos/danielroe/beasties/contributors - 2026-10-28: npm downloads a week
api.npmjs.org/downloads/range/2026-09-28:2026-10-04/beasties