Overview
The Web generator transforms JSX AST entries into complete web bundles with server-side rendered HTML pages, client-side JavaScript with code splitting, and bundled CSS styles.This generator does NOT support streaming/chunked processing because
processJSXEntries needs all entries together to generate code-split bundles.Metadata
Generator identifier
Generator version
Requires JSX AST generator output as input
Configuration
Path to the HTML template file used for rendering pages
Page title used in generated HTML documents
Custom import mappings for componentsDefault:
Output directory path for generated files (HTML, CSS, JS)
Output Format
The generator produces:- HTML files: Server-side rendered pages (e.g.,
http.html,fs.html) - JavaScript chunks: Code-split bundles for client-side hydration
- CSS bundle: Single
styles.cssfile containing all styles
Usage
Dependency Chain
- ast - Parses Markdown to AST
- metadata - Extracts API metadata
- jsx-ast - Converts to JSX components
- web - Renders to HTML/CSS/JS bundles
Implementation Details
The generator:- Reads an HTML template from
templatePath - Creates AST builders for server and client programs
- Processes JSX entries through
processJSXEntriesto convert to HTML/CSS/JS - Writes all output files to the configured output directory
- Returns an array of HTML strings with associated CSS
src/generators/web/