{"id":25764,"library":"isomor-babel","title":"isomor-babel","description":"Babel integration for isomor, a framework that abstracts frontend-backend communication by allowing direct function calls from UI code. v2.0.2 (stable, maintained), ships TypeScript types, requires Node >=11. Unlike REST or GraphQL, isomor uses Babel transpilation to automatically separate client and server code within a single project directory. This package provides the Babel plugin that transforms imports and generates the necessary layers. Key differentiator: eliminates API boilerplate by keeping frontend and backend code together, with TypeScript support.","status":"active","version":"2.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/apiel/isomor","tags":["javascript","typescript"],"install":[{"cmd":"npm install isomor-babel","lang":"bash","label":"npm"},{"cmd":"yarn add isomor-babel","lang":"bash","label":"yarn"},{"cmd":"pnpm add isomor-babel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for Babel plugin integration","package":"@babel/core","optional":false}],"imports":[{"note":"ESM default export; CommonJS require may not work due to ESM nature.","wrong":"const babelPlugin = require('isomor-babel')","symbol":"default","correct":"import babelPlugin from 'isomor-babel'"},{"note":"Named export for custom module handling.","wrong":"import Module from 'isomor-babel'","symbol":"Module","correct":"import { Module } from 'isomor-babel'"},{"note":"Named export for client-side wrapper.","symbol":"ClientWrapper","correct":"import { ClientWrapper } from 'isomor-babel'"},{"note":"TypeScript type imports.","symbol":"type","correct":"import type { BabelOptions } from 'isomor-babel'"}],"quickstart":{"code":"// babel.config.js\nmodule.exports = {\n  plugins: [\n    ['isomor-babel', {\n      client: 'src/client',\n      server: 'src/server',\n      shared: 'src/shared'\n    }]\n  ]\n};\n\n// Then, in your client code, call server functions directly:\n// client/src/app.ts\nimport { greet } from '../server/hello';\nconst response = await greet('World');\nconsole.log(response);","lang":"javascript","description":"Configure Babel plugin for isomor-babel, enabling direct server function calls from client code."},"warnings":[{"fix":"Update babel config to use ['isomor-babel', options] syntax.","message":"Breaking change v1.x to v2.x: Plugin options format changed from object to array-tuple.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to v2.x.","message":"Deprecated: v1.x is no longer maintained.","severity":"deprecated","affected_versions":">=1.0.0 <2.0.0"},{"fix":"Install @babel/core as a devDependency.","message":"Missing peer dependency @babel/core causes runtime errors on 'Cannot find module'","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use import syntax or dynamic import().","message":"ESM-only package: require() fails with 'ERR_REQUIRE_ESM'","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Upgrade Node.js to version 11 or later.","message":"Node version <11 unsupported: throws 'Error: requires node >=11'","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade Babel to version 7 or later.","cause":"Using Babel version 6 or lower with isomor-babel v2.","error":"Error: Requires Babel 7+"},{"fix":"Run npm install @babel/core --save-dev.","cause":"Missing peer dependency @babel/core.","error":"Error: Cannot find module '@babel/core'"},{"fix":"Use import isomorBabel from 'isomor-babel' instead of require().","cause":"Using CommonJS require() on an ESM default export.","error":"TypeError: (0 , _isomorBabel.default) is not a function"},{"fix":"Change to ['isomor-babel', { ... }] in plugins array.","cause":"Using v1.x object syntax in v2.x config.","error":"Error: Plugin configuration must be an array"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}