Registry / http-networking / isomor-transpiler

isomor-transpiler

JSON →
library3.0.4jsnpmunverified

The isomor-transpiler package (v3.0.4) is the Babel-based transpiler for isomor, a full-stack framework that automatically generates API layers between frontend and backend in a single TypeScript project. Instead of writing REST/GraphQL endpoints, isomor transpiler extracts server-side function calls from client code and creates the necessary communication stubs. This package handles the actual transpilation of .ts/.tsx files, converting decorated functions into fetch calls. It is part of the isomor ecosystem, which aims to reduce boilerplate and enforce type safety across the stack. Release cadence is irregular but maintained. Key differentiator: seamless integration with TypeScript, allowing direct imports of server functions without manual API definition.

npm install isomor-transpiler
INSTALL
IMPORT
SIG · ISOMOR-TRANSPILER
I
isomor-transpiler
http-networkingjavascriptv3.0.4
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 transpiler from 'isomor-transpiler'
const transpiler = require('isomor-transpiler')
ESM-only package; CJS require will fail with ERR_REQUIRE_ESM. Use dynamic import if needed.
TransformOptions
import type { TransformOptions } from 'isomor-transpiler'
import { TransformOptions } from 'isomor-transpiler'
Type-only import to avoid runtime side effects; recommended for TypeScript users.
transformSync
import { transformSync } from 'isomor-transpiler'
import { transformSync } from 'isomor-transpiler'
Direct named import; no known wrong pattern.

Demonstrates how to use the transpiler to process a TypeScript file, transforming server imports into API calls. Requires Babel core.

import transpiler from 'isomor-transpiler'; import { transformSync } from '@babel/core'; const code = ` import { getUsers } from '../server/user'; // @isomor is added automatically by the transpiler export default function MyComponent() { getUsers().then(console.log); } `; const result = transpiler.transform(code, { filename: 'MyComponent.tsx', sourceMaps: true }); console.log(result.code);
isomor-transpiler --version
Debug
Known issues
breakingNode.js >=11 required; requires ESM support.
fix
Update Node.js to v11 or later. If using older Node, stick with v2.x.
affects: >=3.0.0
gotchaThe transpiler output is designed to be used in a browser context; some Node.js specific APIs may not be polyfilled.
fix
Ensure any server functions used in client code are side-effect free and do not rely on Node built-ins.
affects: >=3.0.0
deprecatedThe 'transform' function is deprecated in favor of 'transformSync' for synchronous usage.
fix
Replace transpiler.transform with transpiler.transformSync for synchronous use, or use async APIs.
affects: >=3.0.0
gotchaTypeScript decorators may not be fully supported; ensure @isomor decorator is used correctly.
fix
Enable Babel decorator plugin and set isomor-related options in babel config.
affects: >=3.0.0
gotchaSource maps may be inaccurate if input code contains multiple imports from isomor server modules.
fix
Use inline source maps or verify with tool-specific settings.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'isomor-transpiler'
Package not installed or ESM-only; requires 'type': 'module' in package.json or .mjs extension.
fix
npm install isomor-transpiler (and ensure ESM context). If using CommonJS, use dynamic import.
TypeError: isomor_transpiler_1.default is not a function
Using require() on ESM-only package; the package exports a default function but is not wrapped for CJS.
fix
Switch to import syntax: import transpiler from 'isomor-transpiler'
SyntaxError: Unexpected token 'export'
The input code has top-level export but the transpiler may be configured in a non-module mode.
fix
Set sourceType: 'module' in Babel config or pass options to transpiler: { sourceType: 'module' }
Upgrade
Version history
3.0.4latest on npm
Audit
Dependencies
@babel/corerequiredCore Babel compiler used for transpilation
isomoroptionalThe main framework uses this transpiler internally
Agent activity
4 hits · last 30 days
node
4
Resources
isomor-transpiler — npm install isomor-transpiler · libregistry