Beasties is a Webpack/Vite plugin that inlines critical CSS and lazy-loads the rest for improved initial paint time. Version 0.4.2 (as of 2025) is a maintained fork of GoogleChromeLabs/critters, actively developed by the Nuxt/Vue ecosystem. Unlike alternatives using headless browsers, Beasties is lightweight and fast by parsing HTML/CSS directly. It supports preloading fonts, pruning unused CSS, and integrates via beasties-webpack-plugin or vite-plugin-beasties. Requires Node >=18.0.0 and ships TypeScript types.
npm install beastiesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic Beasties usage: instantiate with options, process HTML string to inline critical CSS and lazy-load the rest.
Use 'const Beasties = require("beasties").default' for CommonJS, or switch to import.Upgrade Node.js to >=18.0.0
Use the dedicated webpack plugin package: npm install beasties-webpack-plugin
Always instantiate: const beasties = new Beasties(options)
Use dynamic import: const Beasties = await import('beasties').then(m => m.default); or switch to import syntax.Use default import: import Beasties from 'beasties'
Install beasties-webpack-plugin: npm install -D beasties-webpack-plugin