Registry / devops / atomizer-plugins

atomizer-plugins

JSON →
library1.2.1jsnpmunverified

A set of plugins for esbuild, Rollup, Vite, and Webpack that integrate Atomizer, an atomic CSS generator. Current stable version is 1.2.1. The library uses the unplugin system for unified plugin API across all build tools. Released under the MIT license. Key differentiator: single API for multiple bundlers, TypeScript definitions included. Release cadence is irregular; latest version published 6 months ago.

npm install atomizer-plugins
INSTALL
IMPORT
SIG · ATOMIZER-PLUGINS
A
atomizer-plugins
devopsjavascriptv1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

esbuild
import { esbuild } from 'atomizer-plugins'
const esbuild = require('atomizer-plugins').esbuild
ESM-only package; named export matches build tool name. Cannot use default import.
rollup
import { rollup } from 'atomizer-plugins'
const { atomizer } = require('atomizer-plugins')
Export name is 'rollup', not 'atomizer'. CJS require works but named export is correct.
vite
import { vite } from 'atomizer-plugins'
import vite from 'atomizer-plugins'
Named export, not default. Provides explicit TypeScript types when imported this way.
webpack
import { webpack } from 'atomizer-plugins'
import { atomizerWebpack } from 'atomizer-plugins'
Export name is exactly 'webpack'. There is no alternative naming like 'atomizerWebpack'.

Shows how to configure the Vite plugin with Atomizer rules for atomic CSS classes.

// vite.config.ts import { defineConfig } from 'vite'; import { vite as atomizer } from 'atomizer-plugins'; export default defineConfig({ plugins: [ atomizer({ config: { rules: [ { '.D(b)': { display: 'block' } }, { '.C(#fff)': { color: '#fff' } }, ], }, }), ], });
Debug
Known issues
breakingPackage version 1.x uses unplugin v0.x; unplugin v1.x changed plugin API (object vs function)
fix
Ensure unplugin is pinned to compatible version (^0.x) or upgrade atomizer-plugins when v2 is released.
affects: >=1.0.0 <2.0.0
gotchaPlugin must be placed after JS/TS processing plugins (e.g., react) to generate correct atomic classes
fix
Ensure atomizer-plugins is the last plugin in the array.
affects: >=1.0.0
gotchaESM-only package; using require() in CommonJS context works only if package is imported after Node's ESM resolution
fix
Use dynamic import: const { rollup } = await import('atomizer-plugins'); or set project to type: 'module'.
affects: >=1.0.0
deprecateddeprecated: The 'config' option does not accept a file path string; must pass an object
fix
Provide config object directly, not a path string. Use require() or import as shown in docs.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'atomizer-plugins'
Package not installed or not in node_modules
fix
Run 'npm install atomizer-plugins' and ensure package is present.
SyntaxError: The requested module 'atomizer-plugins' does not provide an export named 'default'
Default import used instead of named import
fix
Use 'import { rollup } from 'atomizer-plugins';' instead of 'import atomizer from 'atomizer-plugins';'
Error: Plugin 'atomizer-plugins' is using unplugin v0.x which is not compatible with unplugin v1.x
Conflicting unplugin versions
fix
Pin unplugin to version ^0.x in your project's package.json.
TypeError: atomizer is not a function
Wrong import or incorrect usage of plugin
fix
Ensure you import the correct named export (e.g., { vite } ) and call it as a function inside plugins array.
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies
unpluginrequiredunplugin provides the unified plugin system for esbuild, Rollup, Vite, and Webpack
atomizerrequiredCore Atomizer library for generating atomic CSS
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
atomizer-plugins — npm install atomizer-plugins · libregistry