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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
createCondition
✓ import { createCondition } from 'babel-runtime-jsx-plus'
✗ const createCondition = require('babel-runtime-jsx-plus').createCondition
Package is ESM-first; named import from single entry.
createList
✓ import { createList } from 'babel-runtime-jsx-plus'
✗ import createList from 'babel-runtime-jsx-plus'
Functions are named exports, not default.
classnames
✓ import { classnames } from 'babel-runtime-jsx-plus'
✗ import classnames from 'babel-runtime-jsx-plus'
Re-exports the 'classnames' package; prefer importing directly from 'classnames' if only using that.
$slot
✓ import { $slot } from 'babel-runtime-jsx-plus'
✗ import { Slot } from 'babel-runtime-jsx-plus'
The slot helper is a function, not a component, and named with dollar sign.
Demonstrates importing and using all runtime helpers: createCondition, createList, createJSXMemo, classnames, and $slot.
import { createCondition, createList, createJSXMemo, classnames, $slot } from 'babel-runtime-jsx-plus';
// Condition
const condition = createCondition(true, 'shown', 'hidden');
console.log(condition); // 'shown'
// List
const list = createList(['a', 'b', 'c'], (item, index) => ({ key: index, text: item }));
console.log(list); // [{ key: 0, text: 'a' }, { key: 1, text: 'b' }, { key: 2, text: 'c' }]
// Memo
const memo = createJSXMemo();
const key = 'item-1';
if (!memo.has(key)) { memo.set(key, { data: 'cached' }); }
console.log(memo.get(key)); // { data: 'cached' }
// classnames
console.log(classnames('foo', { bar: true }, ['baz'])); // 'foo bar baz'
// $slot (simplified usage)
const slotContent = $slot('default', { text: 'Hello' });
console.log(slotContent); // Typically used in JSX; returns children.
Errors
Common errors & fixes
Cannot find module 'babel-runtime-jsx-plus'
Package not installed or not located in node_modules.
fixRun 'npm install babel-runtime-jsx-plus' or 'yarn add babel-runtime-jsx-plus'.
export 'createCondition' was not found in 'babel-runtime-jsx-plus'
Mistyped export name or importing from wrong package version.
fixVerify the export names: createCondition, createList, createJSXMemo, classnames, $slot.
createCondition is not a function
Import syntax error (e.g., default import instead of named import).
fixUse named import: import { createCondition } from 'babel-runtime-jsx-plus'. Audit
Dependencies
classnamesrequiredThe classnames runtime helper delegates to the 'classnames' package for combining class names.