Skip to main content

process_transform

Function process_transform 

Source
pub fn process_transform(
    program: Program,
    cfg: PluginConfig,
    filename_raw: String,
) -> Program
Expand description

Applies the Intlayer SWC transform to program.

This is the core transformation function exposed as a native Rust API. The Wasm plugin entry point ([transform]) delegates directly to this function after deserialising the JSON plugin config.

§Arguments

  • program – The parsed SWC AST to transform.
  • cfg – Plugin configuration (see PluginConfig).
  • filename_raw – Absolute path of the file being compiled, as provided by the build tool. Used to compute relative import paths for injected dictionary imports.

§Returns

The transformed AST.