module_runner_transform

Function module_runner_transform 

Source
pub fn module_runner_transform(
    filename: String,
    source_text: String,
    options: Option<ModuleRunnerTransformOptions>,
) -> ModuleRunnerTransformResult
Expand description

Transform JavaScript code to a Vite Node runnable module.

@param filename The name of the file being transformed. @param sourceText the source code itself @param options The options for the transformation. See {@link ModuleRunnerTransformOptions} for more information.

@returns an object containing the transformed code, source maps, and any errors that occurred during parsing or transformation.

@deprecated Only works for Vite.