derivePreloadPaths
derivePreloadPaths(
files?):string[]
Defined in: packages/runtime/src/wasm/create-wasm-bin.ts:64
Derive a deduplicated preload-path list from an Extension’s files map.
Every file path and its parent directory is added so wasmExec pre-creates
the directory tree in MEMFS before copying files in.
Parameters
Section titled “Parameters”files?
Section titled “files?”Record<string, string>
Optional map of absolute path → file contents.
Returns
Section titled “Returns”string[]
Sorted-insertion-order array of paths to preload; [] if files is undefined.
Example
Section titled “Example”const paths = derivePreloadPaths({ '/etc/vimrc': '...', '/usr/share/vim/defaults.vim': '...' })// → ['/etc/vimrc', '/etc', '/usr/share/vim/defaults.vim', '/usr/share/vim']