Run-time compiler for Electrum-enabled React components, based on babel-standalone. Version 1.9.0 is the latest stable release; the package has had a low release cadence with infrequent updates. It provides a Compiler class capable of transforming JavaScript to ES5 and building React components from source code at runtime. Key differentiators include integration with the Electrum framework, support for registering external symbols, and a built-in eval for ES6/JSX. Note that it compiles synchronously in the browser and depends on Electrum v4.3.0 as a peer dependency.
npm install electrum-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates transforming ES6 to ES5, building an Electrum-enabled React component with registered symbols, and evaluating expressions.
When interpreting error line numbers, subtract 1 from the reported line.
Consider lazy-loading the compiler or using a server-side compilation approach for production.
Use unique keys when registering symbols, or create separate Compiler instances for isolation.
Use import { Compiler } from 'electrum-compiler'Run npm install electrum@^4.3.0