Registry / serialization / babel-preset-cssxjs

babel-preset-cssxjs

JSON →
library0.2.32jsnpmunverified

A Babel preset for compiling CSSX, a CSS-in-JS syntax extension that allows writing CSS directly in JavaScript/JSX files. Version 0.2.32 is a pre-1.0 release with no regular release cadence. It strips CSSX syntax during transpilation, outputting plain JavaScript. Differentiates from other CSS-in-JS libraries by using a custom parser/tokenizer rather than template literals. Limited adoption and documentation.

npm install babel-preset-cssxjs
INSTALL
IMPORT
SIG · BABEL-PRESET-CSSXJ
B
babel-preset-cssxjs
serializationjavascriptv0.2.32
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default (preset)
module.exports = { presets: ['babel-preset-cssxjs'] }
import preset from 'babel-preset-cssxjs'
This package is a CJS preset and should be used in Babel config, not imported directly.
require
const babelPresetCssxjs = require('babel-preset-cssxjs')
const babelPresetCssxjs = require('babel-preset-cssxjs').default
The preset is exported as a function, no default property.
ESM import (rarely used)
import babelPresetCssxjs from 'babel-preset-cssxjs'
import { babelPresetCssxjs } from 'babel-preset-cssxjs'
Named import is incorrect; use default import.

Shows how to configure the preset in .babelrc and run Babel with the preset.

// .babelrc { "presets": [ ["babel-preset-cssxjs", {}] ] } // Then run: npx babel --presets=babel-preset-cssxjs input.js -o output.js
Debug
Known issues
breakingBreaking changes in unpublished versions: no changelog; treat minor bumps as breaking.
fix
Pin to exact version and test after every update.
affects: >=0.0.0
gotchaPreset requires runtime dependency 'cssxjs' for parsing; ensure it is installed.
fix
Install cssxjs: npm install cssxjs
affects: >=0.0.0
deprecatedBabel 6 support dropped; use Babel 7+.
fix
Upgrade to Babel 7 and latest preset version.
affects: <0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'cssxjs'
Missing runtime dependency cssxjs.
fix
Run: npm install cssxjs
Error: Preset requires a function or object, got 'undefined'
Incorrect import or misconfigured preset.
fix
Use require('babel-preset-cssxjs') directly, not default property.
Upgrade
Version history
0.2.32latest on npm
Audit
Dependencies
@babel/corerequiredRequires Babel to run
cssxjsrequiredCore library for parsing CSSX syntax
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
babel-preset-cssxjs — npm install babel-preset-cssxjs · libregistry