@hebilicious/cssforge-unplugin weekly downloads statistics
By hebilicious · npm · Webpack plugins
Bundler plugin that generates CSS Forge design-token output inside the build.
@hebilicious/cssforge-unplugin has 1,330 recorded weekly downloads on npm, an increase of 8213% over the past 30 days, ranking #1995 of 3,247 tracked listings.
About @hebilicious/cssforge-unplugin
@hebilicious/cssforge-unplugin
Generate CSS Forge design-token CSS inside the build, through unplugin: Vite, Rollup, Rolldown, webpack, Rspack, Rsbuild, esbuild, Farm, and Bun.
The plugin loads cssforge.config.ts, serves the generated stylesheet from
virtual:cssforge.css, and watches the config and every local token module it imports, so a token
edit regenerates the stylesheet.
Install
pnpm add -D @hebilicious/cssforge-unplugin
Runtime dependencies are unplugin and @hebilicious/cssforge. Bundlers are not dependencies or peers:
your project already has one, and it stays the only one installed. The package exports both ESM and
CommonJS, because webpack and Rspack configs are often CommonJS.
Vite
// vite.config.ts
import cssforge from "@hebilicious/cssforge-unplugin/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [cssforge()],
});
// src/main.ts
import "virtual:cssforge.css";
Add the ambient declaration once so TypeScript accepts the import:
// src/vite-env.d.ts
/// <reference types="@hebilicious/cssforge-unplugin/client" />
Other bundlers
| Bundler | Import | Notes |
|---|---|---|
| Vite | @hebilicious/cssforge-unplugin/vite | Styles update through HMR when a token changes. |
| Rollup | @hebilicious/cssforge-unplugin/rollup | Needs a CSS plugin, or set write. |
| Rolldown | @hebilicious/cssforge-unplugin/rolldown | Needs a CSS plugin, or set write. |
| webpack | @hebilicious/cssforge-unplugin/webpack | Needs an asset rule for CSS. |
| Rspack | @hebilicious/cssforge-unplugin/rspack | Needs an asset rule for CSS. |
| Rsbuild | @hebilicious/cssforge-unplugin/rsbuild | CSS is handled out of the box. |
| esbuild | @hebilicious/cssforge-unplugin/esbuild | CSS is handled out of the box. |
| Farm | @hebilicious/cssforge-unplugin/farm | CSS is handled out of the box. |
| Bun | @hebilicious/cssforge-unplugin/bun | CSS is handled out of the box. |
// webpack.config.js
const cssforge = require("@hebilicious/cssforge-unplugin/webpack");
module.exports = {
plugins: [cssforge()],
};
Options
cssforge({
// Resolved against the build's working directory. Default: ./cssforge.config.ts
config: "./cssforge.config.ts",
// Write the stylesheet to disk as well as serving the virtual module.
// Default: false
write: { css: "./.cssforge/output.css" },
});
write: true uses ./.cssforge/output.css, the CLI's default path. Use it when a tool needs a real
file, or when a bundler has no CSS handling for virtual modules.
Behavior
-
Lazy generation. The stylesheet is generated the first time
virtual:cssforge.cssis loaded. Withwrite, it is also generated duringbuildStart, so the file exists even when nothing imports the module. -
Watch. The config file and every local module it imports are registered as watch files. A change invalidates the cached stylesheet, so the next build regenerates it. In Vite, the running dev server updates the styles without a page reload.
-
One config per plugin instance. Generation reuses the core
generateCSS, so plugin output is byte-identical to the CLI's--mode cssoutput for the same config. -
No CSS layer. The virtual module serves exactly what
generateCSSproduces, so the declarations are unlayered.@import "virtual:cssforge.css" layer(cssforge)does not work, because a CSS import resolves to a file. To keep tokens in a cascade layer, setwriteand import the written file:@import "./.cssforge/output.css" layer(cssforge); -
Errors. A missing config or a generation failure fails the build with the same error the CLI reports, including the config path and the offending token path.
Requirements
Node 24 or newer, matching @hebilicious/cssforge. The config is loaded with Node's native TypeScript
support, so no extra loader is needed.
Description from the npm listing.
- unplugin
- cssforge
- design-tokens
- css-variables
- vite-plugin
- rollup-plugin
- webpack-plugin
- rspack-plugin
- esbuild-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 @hebilicious/cssforge-unplugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@hebilicious/cssforge-unplugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.