Cherry is an experimental ClojureScript-to-ES6 module compiler that outputs readable, source-mapped .mjs files. It aims to reduce friction between ClojureScript and JavaScript tooling by producing ES6 modules that can be used directly with Node.js, Vite, and other modern JS toolchains. Unlike the official ClojureScript compiler, Cherry does not depend on Google Closure and is distributed as an NPM package. It supports macros, REPL, async/await, JSX via #jsx, and JS object destructuring. Version 0.5.34 is the latest; the project is experimental and not recommended for production use, with many bugs and frequent breaking changes.
npm install cherry-cljsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compile and run a minimal ClojureScript file that uses Node.js fs and url modules.
Pin a specific version and test thoroughly before upgrading.
Ensure runtime version matches compiler version, or use lockfile.
Use `import { core } from 'cherry-cljs'` instead.Refer to issue tracker for known incompatibilities; consider Squint for CLJS syntax to JS compilation.
Update .cljs files to use the new require syntax: `(:require ["mod" :as mod])` instead of `(:require ["mod" :refer [foo]])` for default imports.
Use `npx cherry run --debug` for better error messages, but expect occasional mismatches.
Run `npm install cherry-cljs@latest`. Ensure import uses named export: `import { cherry } from 'cherry-cljs'`.Use `import { cherry } from 'cherry-cljs'` instead of `import cherry from 'cherry-cljs'`.Use new syntax: `(:require ["module-name" :as alias])` or `(:require ["module-name" :refer [symbol]])`.