Registry / web-framework / babel-preset-hyperdom

babel-preset-hyperdom

JSON →
library2.0.0jsnpmunverified

Babel preset for hyperdom, a React-like library with a custom JSX syntax for data binding. Current stable version is 2.0.0, released alongside hyperdom V2 which requires Babel 7. For Babel 6 use version 1.4.0. This preset transforms JSX binding expressions (e.g., `binding="item[n].method().name"`) into JavaScript function calls. It is specifically designed for hyperdom and not a general-purpose JSX preset.

npm install babel-preset-hyperdom
INSTALL
IMPORT
SIG · BABEL-PRESET-HYPER
B
babel-preset-hyperdom
web-frameworkjavascriptv2.0.0
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
module.exports = require('babel-preset-hyperdom')
import preset from 'babel-preset-hyperdom'
This is a CommonJS module; ESM import is not supported. In .babelrc or babel.config.js, use string reference 'hyperdom'.

Shows .babelrc configuration and transpilation of a binding expression.

// .babelrc { "presets": ["hyperdom"] } // Source file (.jsx) <input type="text" binding="item[n].method().name" /> // Transpiles to: hyperdom.jsx("input", { type: "text", binding: [item[n].method(), "name"] });
Debug
Known issues
breakingVersion 2.0.0 requires Babel 7. Attempting to use with Babel 6 will cause errors.
fix
Upgrade to Babel 7 or use version 1.4.0 with Babel 6.
affects: >=2.0.0
deprecatedVersion 1.4.0 is deprecated for Babel 7 users. It will not receive updates.
fix
Upgrade to 2.0.0 with Babel 7.
affects: <2.0.0
gotchaThis preset only works with hyperdom JSX binding syntax. Using standard JSX without binding will not be transformed.
fix
Ensure your JSX expressions use the binding attribute as shown in the documentation.
affects: all
Errors
Common errors & fixes
Error: Cannot find module '@babel/core'
Missing @babel/core peer dependency when using version 2.x.
fix
npm install --save-dev @babel/core
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using ESM import syntax with this CommonJS preset in a babel.config.js file that expects ESM.
fix
Use module.exports or require in CommonJS config, or reference preset as string 'hyperdom'.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
@babel/corerequiredRequires Babel 7+ for version 2.x
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
babel-preset-hyperdom — npm install babel-preset-hyperdom · libregistry