Registry / web-framework / rollup-plugin-windicss

rollup-plugin-windicss

JSON →
library1.9.4jsnpmunverified

A Rollup plugin for Windi CSS, an on-demand Tailwind CSS replacement that generates utilities at build time instead of scanning a massive pre-generated stylesheet. Version 1.9.4 is current, maintained as part of the vite-plugin-windicss monorepo. It provides fast compilation, supports Tailwind CSS v2 configs, utility groups, CSS @apply/@screen transforms, and Vite/HMR compatibility. Peer dependency on Rollup. Differentiates from Tailwind CSS by being faster for large projects and generating only used styles.

npm install rollup-plugin-windicss
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-WIND
R
rollup-plugin-windicss
web-frameworkjavascriptv1.9.4
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WindiCSS
✓ import WindiCSS from 'rollup-plugin-windicss'
✗ const WindiCSS = require('rollup-plugin-windicss')
Default export; must use ESM import in Rollup config due to plugin ecosystem.
defineConfig
✓ import { defineConfig } from 'rollup-plugin-windicss'
✗ const { defineConfig } = require('rollup-plugin-windicss')
Named export for configuring Windi CSS options.
VirtualModule
✓ import 'virtual:windi.css'
✗ import 'windi.css'
Must import the virtual module in your entry file; the plugin transforms it.

Shows minimal Rollup config with the plugin and virtual CSS import in entry.

// rollup.config.mjs import WindiCSS from 'rollup-plugin-windicss'; export default { input: 'src/main.js', output: { dir: 'dist', format: 'esm' }, plugins: [WindiCSS()] }; // src/main.js import 'virtual:windi.css'; console.log('Hello, Windi CSS!');
Debug
Known issues
gotchaThe plugin is part of the vite-plugin-windicss monorepo; ensure compatibility with Rollup version (peer dep *).
fix
Use Rollup >=2.0.0; check for breaking changes in monorepo releases.
affects: >=1.0.0
deprecatedWindi CSS project is deprecated in favor of Tailwind CSS v3. New projects should consider Tailwind CSS or UnoCSS.
fix
Migrate to Tailwind CSS v3 or UnoCSS; rollup-plugin-windicss still works for existing projects.
affects: >=1.0.0
gotchaVirtual CSS module 'virtual:windi.css' must be imported after the plugin is added to config, or it won't be resolved.
fix
Ensure the plugin is added to the rollup config before the import in your source.
affects: >=1.0.0
breakingVersion 1.9.0 dropped support for some older Rollup versions; require Rollup >=2.60.0.
fix
Update Rollup to ^2.60.0 or higher.
affects: >=1.9.0
Errors
Common errors & fixes
The "path" argument must be of type string or an instance of URL. Received undefined
Plugin version 1.8.10 had a bug when config file was not found but required.
fix
Update to version >=1.8.11 or ensure a windi.config.js exists.
SyntaxError: Cannot use import statement outside a module
Using require() with ESM-only package; rollup-plugin-windicss is ESM-only.
fix
Use import syntax and ensure rollup.config.mjs or "type": "module" in package.json.
Module not found: Error: Package path ./utils is not exported
Accessing internal modules that are not exported from package.
fix
Only use public API exports; do not import from subpath "rollup-plugin-windicss/utils".
Upgrade
Version history
1.9.4latest on npm
Audit
Dependencies
rollupoptionalPeer dependency required for Rollup plugin compatibility
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-windicss — npm install rollup-plugin-windicss · libregistry