app-transpiler
raw JSON → 1.0.13 verified Fri May 01 auth: no javascript
app-transpiler is a build tool for transpiling JavaScript/TypeScript applications with a focus on simplicity and fast iteration. The current stable version is 1.0.13, released on an ad-hoc basis with no fixed cadence. It differentiates itself by offering zero-config setup and out-of-the-box support for JSX and modern ECMAScript features, targeting both Node.js and browser environments.
Common errors
error Error: Cannot find module 'app-transpiler' ↓
cause Package not installed or incorrect import path.
fix
Run 'npm install app-transpiler' and ensure the import statement is correct.
error SyntaxError: Unexpected token 'export' ↓
cause Using require() with an ESM-only package.
fix
Change require() to import syntax or use dynamic import.
error TypeError: transpile is not a function ↓
cause Wrong import style (e.g., default import used as object).
fix
Use named import: import { transpile } from 'app-transpiler'.
Warnings
gotcha The package is ESM-only; require() will throw an error. ↓
fix Use import syntax instead of require().
deprecated The 'transpile' function's callback parameter is deprecated. ↓
fix Use the promise-based API: await transpile(...) or transpile(...).then(...).
gotcha The package does not include TypeScript type definitions. ↓
fix Install @types/app-transpiler from DefinitelyTyped or create a declaration file manually.
Install
npm install app-transpiler yarn add app-transpiler pnpm add app-transpiler Imports
- transpile wrong
const transpile = require('app-transpiler');correctimport { transpile } from 'app-transpiler'; - createConfig wrong
const createConfig = require('app-transpiler').createConfig;correctimport { createConfig } from 'app-transpiler'; - default wrong
import { default } from 'app-transpiler';correctimport transpiler from 'app-transpiler';
Quickstart
import { transpile } from 'app-transpiler';
const code = `
const greet = (name) => {
console.log(`Hello, ${name}!`);
};
greet('World');`;
const result = await transpile(code, { presets: ['@babel/preset-env'] });
console.log(result.code);