Skip to main content

SHEET 06 OF 41

/DOC/:SLUG

PART:
03 DOCUMENTATION
CIRCULATION:
PUBLIC
SOURCE:
pages/Doc/[...Slug].astro
AS OF:
2026-12-02

The build artifact management layer for Land that compiles VS Code platform source through a dual-compiler pipeline (ESBuild primary, Rest OXC optional), produces the @codeeditorland/output npm package, and is consumed by Cocoon, Sky and Wind.

/Elements

Output

The build artifact management layer for Land that compiles VS Code platform source through a dual-compiler pipeline (ESBuild primary, Rest OXC optional), produces the @codeeditorland/output npm package, and is consumed by Cocoon, Sky and Wind.

PUBLISHED ELEMENTS Source/Content/doc/output.md UNAVAILABLE UNAVAILABLE ARCHITECTURE 8

STATUS UNAVAILABLE NEXT OPEN THE ELEMENT'S MANUAL - IT DESCRIBES THE THING THE CAPTURE WOULD HAVE SHOWN.

# PLATE_01 / OUTPUT

FIGURE: The capture this record's evidence would show: forged metal surface in macro.

This element has no evidence manifest in the build, so there is no capture to describe. The record above still prints its working - form, boundary, dependencies, manual and trace - and none of those fields is a picture.

SUBJECT:
FORGED METAL SURFACE IN MACRO
MANIFEST:
UNAVAILABLE
STATE:
UNAVAILABLE
PLATE:
UNAVAILABLE

SOURCE: SOURCE/CONTENT/ELEMENT/WORKING.TS

Output is the build orchestration layer for Land’s TypeScript assets. It wraps ESBuild with Land-specific transforms, plugin hooks, and polyfill injection, and supports an optional Rest (OXC-based) compiler pipeline for faster TypeScript compilation. The result is published as the @codeeditorland/output npm package consumed by Cocoon (extension host), Sky (UI layer), and Wind (service layer).

Architecture

Mermaid diagram

Module Map

Path Purpose
Source/ESBuild/Output.ts Primary ESBuild compilation pipeline
Source/ESBuild/Rest/ Rest OXC compiler plugin integration
Source/ESBuild/Microsoft/ VS Code source-specific compilation config
Source/ESBuild/CodeEditorLand/ Land-specific compilation config
Source/ESBuild/Exclude/ Exclude patterns for compilation
Source/Plugin/Apply.ts ESBuild plugin for applying transforms
Source/Plugin/Copy/ Asset copying plugin
Source/Plugin/Transform/ Code transform plugins
Source/Plugin/Polyfill/ Polyfill injection plugins
Source/Plugin/Index.ts Plugin registry
Source/Polyfill/Child/ Child process polyfills
Source/Polyfill/File/ File system polyfills
Source/Polyfill/IPC/ IPC polyfills
Source/Polyfill/Native/ Native module polyfills
Source/Polyfill/Process/ Process polyfills
Source/Polyfill/Shared/ Shared polyfill utilities
Source/Service/CEL/ Code Editor Land specific services
Source/Service/Dev/ Development-time services
Source/Service/Tauri/ Tauri-specific services
Source/Asset/Style/ CSS asset management
Source/Apply/Pipeline.ts Apply pipeline orchestration

Compiler Modes

Output supports two compiler backends.

Default: ESBuild

Mermaid diagram

Optional: Rest OXC

Activated via Compiler=Rest environment variable:

Mermaid diagram

Integration

// Output/ESBuild/Output.ts
const compiler =
	process.env.Compiler === "Rest" ? await import("./Rest/RestPlugin") : null;

const plugins = [];
if (compiler) {
	plugins.push(compiler.createPlugin());
}
// Standard ESBuild build with optional Rest plugin

Build Pipeline

The Output build pipeline processes VS Code platform code:

flowchart TD
    A["1. Input discovery"] --> B["2. Module resolution"]
    B --> C["3. Transform application"]
    C --> D["4. Bundle compilation"]
    D --> E["5. Output packaging"]
1. Input discovery
   - Reads from Dependency/Editor/out/ (Stage 1 compiled VS Code)
   - Identifies entry points (workbench, extHost files)

2. Module resolution
   - Remaps electron imports to Tauri stubs
   - Remaps Node.js built-in modules to polyfills
   - Resolves Land-specific module paths

3. Transform application
   - Polyfill injection (see below)
   - Source map chaining
   - Platform code markers (CEL:platform)

4. Bundle compilation
   - ESBuild compiles to single or multiple output files
   - Source maps generated for debugging

5. Output packaging
   - Produces @codeeditorland/output package
   - Versioned and cached in Output/Target/

Plugin System

Output defines a plugin interface for extending the build pipeline:

export interface OutputPlugin {
	name: string;
	setup(build: ESBuild.PluginBuild): void;
}

Built-in Plugins

Plugin Purpose
Apply.ts Applies Land-specific code transforms
Copy.ts Copies static assets to output directory
Transform.ts TypeScript-to-JavaScript transformation config
Polyfill/Index.ts Polyfill injection orchestration
RestPlugin.ts Rest OXC compiler integration (optional)

Polyfill Injection

Output injects polyfills during compilation for APIs that don’t exist in the Tauri WebView:

Polyfill Target Replaces
Child/ child_process module No-op stubs
File/ fs module Tauri invoke wrappers
IPC/ ipcRenderer Tauri event system
Native/ Native Node modules No-op stubs
Process/ process global Wind Preload shim integration
Shared/ Shared polyfill utilities Shared initialization
  • Polyfills are injected via ESBuild’s inject configuration
  • Prepends the polyfill modules to output bundles

Output Layout

After compilation, Output produces the following structure:

Output/Target/
+-- @codeeditorland/output/
    +-- index.js                    # Main entry point
    +-- workbench/                  # VS Code workbench bundle
    |   +-- workbench.js
    |   +-- workbench.css
    +-- extHost/                    # Extension host bootstrap
    |   +-- extHost.js
    +-- vs/                         # VS Code platform code
    |   +-- base/
    |   +-- platform/
    |   +-- workbench/
    +-- polyfills/                  # Injected polyfill modules
    +-- sourcemaps/                 # Source maps
    +-- package.json                # npm package manifest


Project Maintainers: Source Open (Source/[email protected]) | GitHub Repository | Report an Issue

The record this page documents, as the site files it: the six facts the claim is checked against, and the three files the manual names to check it.

WORKING, 06

FORM:
BUILD PIPELINE
WRITTEN IN:
TYPESCRIPT
BOUNDARY:
ESBUILD PLUGIN
DEPENDS ON:
REST
MANUAL:
/DOC/OUTPUT
EVIDENCE:
UNAVAILABLE NO MANIFEST IN THE BUILD

# TRACE / OUTPUT 03 STEPS

  1. 01 Source/ESBuild/Output.ts THE ESBUILD OUTPUT
  2. 02 Source/Plugin/Apply.ts THE APPLY PLUGIN
  3. 03 Polyfill/Index.ts THE POLYFILLS

SOURCE: /DOC/OUTPUT

Elements, 17 PAGES, page 10 of 17

THE LAYER'S INDEX

NEXT: /BLOG 04 BLOG

NOTES FROM THE BUILD, NEWEST FIRST

〈06〉 /DOC/:SLUG 41 SHEETS AS OF: 2026-12-02