Registry / web-framework / rollup-plugin-thunder

rollup-plugin-thunder

JSON →
library2.0.1jsnpmunverified

A Rollup plugin for LightningCSS, providing CSS transformation, minification, and module support. Current stable version 2.0.1 (September 2025) with regular updates. Key differentiators: seamless integration with Rollup, auto CSS modules via naming conventions, and support for CSSStyleSheet. ESM-only, TypeScript-friendly with bundled types.

npm install rollup-plugin-thunder
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-THUN
R
rollup-plugin-thunder
web-frameworkjavascriptv2.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

thunder
import thunder from 'rollup-plugin-thunder'
const thunder = require('rollup-plugin-thunder')
Default import. CommonJS require will fail; ESM-only since v1.
clasess
import { clasess } from 'rollup-plugin-thunder'
import { classes } from 'rollup-plugin-thunder'
Named export for CSS class list. Spelling is intentional: 'clasess' (double s). Breaking change in v2.0.0.
C
import { C } from 'rollup-plugin-thunder'
Shorthand named export for clasess (available since v2.0.0).
type Options
import type { Options } from 'rollup-plugin-thunder'
import { Options } from 'rollup-plugin-thunder'
Type import for TypeScript users. Only available as type, not runtime value.

Configures Rollup with Thunder plugin for CSS processing: minification, source maps, CSS modules, and auto-module detection.

import thunder from 'rollup-plugin-thunder'; export default { input: 'src/index.css', plugins: [ thunder({ minify: true, sourceMap: true, modules: true, autoModules: /\\.module\\.css$/, }), ], output: { dir: 'dist', format: 'esm', }, };
Debug
Known issues
breakingExport class list as `clasess` and shorthand `C` named export. Previous `classes` export removed.
fix
Change imports to use 'clasess' or 'C' instead of 'classes'.
affects: >=2.0.0
deprecatedOptions may change in future minor versions without major semver bump.
fix
Pin exact version and review changelog for option changes.
affects: >=1.0.0
gotchaThe 'clasess' export name is intentionally misspelled. Expect typos in user code.
fix
Use correct spelling 'clasess' or shorthand 'C'.
affects: >=2.0.0
gotchaPlugin is ESM-only. CommonJS require() throws error.
fix
Use dynamic import or ensure project is ESM.
affects: >=1.0.0
gotchaCSS modules auto-detection may conflict with other CSS plugins (e.g., postcss).
fix
Disable 'autoModules' or customize regex to avoid overlap.
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
Using CommonJS require() to import an ESM-only package.
fix
Use dynamic import: const thunder = await import('rollup-plugin-thunder');
Module '"rollup-plugin-thunder"' has no exported member 'classes'.
Named export 'classes' was renamed to 'clasess' in v2.0.0.
fix
Use 'clasess' or 'C' instead of 'classes'.
TypeError: thunder is not a function
Default import used as function but imported as named export.
fix
Use default import: import thunder from 'rollup-plugin-thunder'
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
lightningcssrequiredCore CSS processing engine
enhanced-resolverequiredModule resolution for CSS imports
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-thunder — npm install rollup-plugin-thunder · libregistry