pub async fn create_code_graph(
    roots: Vec<(ModuleSpecifier, ModuleKind)>,
    is_dynamic: bool,
    maybe_imports: Option<Vec<(ModuleSpecifier, Vec<String>)>>,
    loader: &mut dyn Loader,
    maybe_resolver: Option<&dyn Resolver>,
    maybe_locker: Option<Rc<RefCell<Box<dyn Locker>>>>,
    maybe_module_analyzer: Option<&dyn ModuleAnalyzer>,
    maybe_reporter: Option<&dyn Reporter>
) -> ModuleGraph
Expand description

Create a module graph, including only dependencies of the roots that would contain code that would be executed, skipping any type only dependencies. This is useful when wanting to build a graph of code for loading in runtime that doesn’t care about type only dependencies.