Playground

The compiler runs in the page.

This page imports the maintained compiler as ordinary ESM, compiles the editor contents in the browser, and executes the result. No server participates; the same package specifiers resolve here, in the tests, and on the command line.

Playground ⌘/Ctrl + Enter

Source

Output


              

              
Compiled ESM

              

Requirements

The page loads the compiler from the repository it is served with, so the served directory must include the repository root. Build the compiled page application first:

bun run build:browser-playground

Until that build exists, the page reports the missing entry instead of compiling. Browsers refuse to load ES modules from file://, so this page needs a static server; the rest of the documentation opens directly from disk. See the playground example for the full walkthrough.

Resolution

Compiled output imports the runtime by package specifier. One import-map prefix above resolves it here, and the package export map resolves the same specifiers in Bun and Node, so the page, the tests, and the command line share one scheme.

The editor paints a highlighted copy behind a transparent textarea, and the compiled pane is highlighted by the same scanner, which is itself written in Eliscript.