Skip to main content

Module paths

Module paths 

Source
Expand description

Path helpers used to build the module specifiers of the injected dictionary imports.

Functionsยง

normalize_path
Normalises a path string to use forward slashes and consistent drive-letter casing so that pathdiff::diff_paths works correctly in Wasm / cross-platform contexts where Windows-style paths may arrive from the JS host.
relative_import_path
Computes the module specifier for an injected dictionary import: the path of dict_file_abs relative to from_dir_abs, using forward slashes and a leading ./ when the path is not already relative. Falls back to the absolute path when no relative path exists (e.g. different drives).