pub(crate) fn bundle(
root: &Path,
target: &Path,
apis_blob_url: String,
dependency_map: &HashMap<String, String>,
) -> Result<String, Error>
Expand description
Bundle a widget into a single ESM string given its entry point.
The dependency_map
argument is an optional mapping with keys being the module
specifiers to ignore. The import statements with these module specifiers will be
left as is in the bundled code without path resolution. This should commonly be the
list of external dependencies, since Deskulpt requires widget developers to bundle
their external dependencies (if any) to be included directly in the Webview.