Skip to main content

render_page

Function render_page 

Source
pub fn render_page(
    resolved: &ResolvedComponent,
    data: &Value,
) -> Result<String, String>
Expand description

Render a resolved .van component into a full HTML page.

Pipeline:

  1. resolve_single() → “dirty” HTML (still has @click, v-show, {{ reactive }})
  2. generate_signals() → positional signal JS from the dirty HTML
  3. cleanup_html() → strip directives, interpolate remaining {{ }}, producing clean HTML
  4. Inject styles + scripts into clean HTML

Unlike van-dev-server’s render, this does NOT inject client.js (WebSocket live reload).