[Go to site: main page, start]

Skip to main content

Crate oj_compiler

Crate oj_compiler 

Source
Expand description

The fused per-file compile pipeline.

One arena, one parse, one fused transform pass-set, one codegen: TSX/TS/JSX -> strip types -> JSX (automatic runtime) -> React Fast Refresh instrumentation (dev) -> JS + sourcemap.

This is the hot path of the whole tool. Everything here must stay allocation-conscious and must never re-parse between stages — that single-parse property is the speed edge over plugin-pipeline designs.

Modules§

bundle
ESM -> registry-factory transform for full bundle mode (M4).
cjs
CJS -> ESM interop for dependencies served to a native-ESM browser.

Structs§

CompileOptions
CompileOutput

Enums§

CompileError

Functions§

compile
compile_module

Type Aliases§

ImportRewriter
Maps an import specifier to a replacement (e.g. ./App -> /src/App.tsx). Returning None leaves the specifier untouched.