zecorn is a Babel-compatible transpiler built on acorn, version 0.10.1. It provides a babel plugin layer with strong source mapping, enabling reuse of existing Babel plugins. Developed for WMR but usable standalone. Unlike Babel, it uses acorn for parsing, offering lighter weight and faster transforms. Ships TypeScript types. Release cadence is sporadic; check GitHub for latest.
npm install zecornNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of transform with a custom Babel plugin replacing a numeric literal.
Use only plugins that are compatible with acorn AST or wrap them with acorn-specific adapters.
Ensure parse function accepts (code, opts) and returns an AST object compatible with acorn.
Monitor the repository for updates or consider using alternatives like Babel standalone.
Run 'npm install -D zecorn' or 'yarn add -D zecorn'.
Use ES module import syntax: import { transform } from 'zecorn'Ensure you pass a valid parse function, e.g., import { parse } from 'zecorn' and pass it as { parse }.