Exporting ClojureScript Functions to JavaScript with ^:export
Learn how to expose ClojureScript functions to plain JavaScript using ^:export, see a concrete example, and understand the trade‑offs with dead‑code elimination.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to expose ClojureScript functions to plain JavaScript using ^:export, see a concrete example, and understand the trade‑offs with dead‑code elimination.
Shrink your ClojureScript bundle by enabling :advanced compiler optimizations and adding proper externs for external libraries like lodash. Follow a concrete example, verify runtime integrity, and understand the trade‑offs.
Learn how externs files keep external JavaScript names intact during ClojureScript's advanced compilation, letting you shrink bundles without breaking third‑party APIs.
Learn how to enable genuine dead‑code elimination in ClojureScript using Shadow‑CLJS with :optimizations :advanced, verify the bundle size, and avoid common interop pitfalls.
Discover how ClojureScript’s :advanced mode can shrink JavaScript bundles by 30‑70 % through dead‑code elimination, what to configure, and how to avoid common pitfalls.
Shadow-CLJS makes npm a first-class ClojureScript dependency with automatic externs and incremental builds, speeding UI feedback while requiring care with advanced compilation.
Discover how to enable ClojureScript's :advanced compiler flag and write externs to cut bundle size by up to 70% while keeping the public API intact.
Learn how ClojureScript’s `defmacro` expands at compile time, how it behaves across browser, Node.js, and React Native targets, and how to verify macro output before shipping. Includes a concrete example, trade‑offs, and actionable steps.
Guidance on picking shadow-cljs or the official ClojureScript compiler for a web app, covering npm integration, REPL workflow, and build trade‑offs.