Skip to main content

node_modules_mount

Function node_modules_mount 

Source
pub fn node_modules_mount(
    host_node_modules_dir: impl Into<String>,
) -> MountConfig
Expand description

Mount a host node_modules directory into the VM at /root/node_modules.

Rust mirror of TS nodeModulesMount(...) (packages/core/src/host-dir-mount.ts). This is the explicit, mount-based replacement for the removed moduleAccessCwd option: the guest module resolver reads the mounted tree through the kernel VFS, so the caller supplies exactly the node_modules directory whose packages should be resolvable in the guest. The mount is read-only.