Skip to main content

Module program

Module program 

Source
Expand description

Main entrypoint for the React Compiler.

This module is a port of Program.ts from the TypeScript compiler. It orchestrates the compilation of a program by:

  1. Checking if compilation should be skipped
  2. Validating restricted imports
  3. Finding program-level suppressions
  4. Discovering functions to compile (components, hooks)
  5. Processing each function through the compilation pipeline
  6. Applying compiled functions back to the AST

Functionsยง

compile_program
Main entry point for the React Compiler.