Registry / web-framework / isomor-babel

isomor-babel

JSON →
library2.0.2jsnpmunverified

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.

npm install isomor-babel
INSTALL
IMPORT
SIG · ISOMOR-BABEL
I
isomor-babel
web-frameworkjavascriptv2.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
import babelPlugin from 'isomor-babel'
const babelPlugin = require('isomor-babel')
ESM default export; CommonJS require may not work due to ESM nature.
Module
import { Module } from 'isomor-babel'
import Module from 'isomor-babel'
Named export for custom module handling.
ClientWrapper
import { ClientWrapper } from 'isomor-babel'
Named export for client-side wrapper.
type
import type { BabelOptions } from 'isomor-babel'
TypeScript type imports.

Configure Babel plugin for isomor-babel, enabling direct server function calls from client code.

// babel.config.js module.exports = { plugins: [ ['isomor-babel', { client: 'src/client', server: 'src/server', shared: 'src/shared' }] ] }; // Then, in your client code, call server functions directly: // client/src/app.ts import { greet } from '../server/hello'; const response = await greet('World'); console.log(response);
Debug
Known issues
breakingBreaking change v1.x to v2.x: Plugin options format changed from object to array-tuple.
fix
Update babel config to use ['isomor-babel', options] syntax.
affects: >=2.0.0
deprecatedDeprecated: v1.x is no longer maintained.
fix
Upgrade to v2.x.
affects: >=1.0.0 <2.0.0
gotchaMissing peer dependency @babel/core causes runtime errors on 'Cannot find module'
fix
Install @babel/core as a devDependency.
affects: >=2.0.0
gotchaESM-only package: require() fails with 'ERR_REQUIRE_ESM'
fix
Use import syntax or dynamic import().
affects: >=2.0.0
gotchaNode version <11 unsupported: throws 'Error: requires node >=11'
fix
Upgrade Node.js to version 11 or later.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Requires Babel 7+
Using Babel version 6 or lower with isomor-babel v2.
fix
Upgrade Babel to version 7 or later.
Error: Cannot find module '@babel/core'
Missing peer dependency @babel/core.
fix
Run npm install @babel/core --save-dev.
TypeError: (0 , _isomorBabel.default) is not a function
Using CommonJS require() on an ESM default export.
fix
Use import isomorBabel from 'isomor-babel' instead of require().
Error: Plugin configuration must be an array
Using v1.x object syntax in v2.x config.
fix
Change to ['isomor-babel', { ... }] in plugins array.
Upgrade
Version history
2.0.2latest on npm
Audit
Dependencies
@babel/corerequiredpeer dependency required for Babel plugin integration
Agent activity
4 hits · last 30 days
node
4
Resources
isomor-babel — npm install isomor-babel · libregistry