{"id":19300,"library":"babel-preset-hyperdom","title":"babel-preset-hyperdom","description":"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.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/featurist/babel-preset-hyperdom","tags":["javascript","babel","hyperdom","jsx"],"install":[{"cmd":"npm install babel-preset-hyperdom","lang":"bash","label":"npm"},{"cmd":"yarn add babel-preset-hyperdom","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-preset-hyperdom","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Babel 7+ for version 2.x","package":"@babel/core","optional":false}],"imports":[{"note":"This is a CommonJS module; ESM import is not supported. In .babelrc or babel.config.js, use string reference 'hyperdom'.","wrong":"import preset from 'babel-preset-hyperdom'","symbol":"default","correct":"module.exports = require('babel-preset-hyperdom')"}],"quickstart":{"code":"// .babelrc\n{\n  \"presets\": [\"hyperdom\"]\n}\n\n// Source file (.jsx)\n<input type=\"text\" binding=\"item[n].method().name\" />\n// Transpiles to:\nhyperdom.jsx(\"input\", { type: \"text\", binding: [item[n].method(), \"name\"] });","lang":"javascript","description":"Shows .babelrc configuration and transpilation of a binding expression."},"warnings":[{"fix":"Upgrade to Babel 7 or use version 1.4.0 with Babel 6.","message":"Version 2.0.0 requires Babel 7. Attempting to use with Babel 6 will cause errors.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to 2.0.0 with Babel 7.","message":"Version 1.4.0 is deprecated for Babel 7 users. It will not receive updates.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Ensure your JSX expressions use the binding attribute as shown in the documentation.","message":"This preset only works with hyperdom JSX binding syntax. Using standard JSX without binding will not be transformed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev @babel/core","cause":"Missing @babel/core peer dependency when using version 2.x.","error":"Error: Cannot find module '@babel/core'"},{"fix":"Use module.exports or require in CommonJS config, or reference preset as string 'hyperdom'.","cause":"Using ESM import syntax with this CommonJS preset in a babel.config.js file that expects ESM.","error":"Error: Plugin/Preset files are not allowed to export objects, only functions."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}