summaryrefslogtreecommitdiff
path: root/cli/tools/bundle.rs
diff options
context:
space:
mode:
authorAndreu Botella <andreu@andreubotella.com>2023-03-19 00:43:07 +0100
committerGitHub <noreply@github.com>2023-03-19 00:43:07 +0100
commitb64ec7926831896f4e43b685891111409de45e85 (patch)
treeb91550f9c21931f7bf691a6c298b64ff63c16041 /cli/tools/bundle.rs
parenta80d1b6e663bd439bd12b7c65cc1ac017bafb886 (diff)
feat(compile): Enable multiple roots for a standalone module graph (#17663)
This change will enable dynamic imports and web workers to use modules not reachable from the main module, by passing a list of extra side module roots as options to `deno compile`. This can be done by specifying "--include" flag that accepts a file path or a URL. This flag can be specified multiple times, to include several modules. The modules specified with "--include" flag, will be added to the produced "eszip".
Diffstat (limited to 'cli/tools/bundle.rs')
-rw-r--r--cli/tools/bundle.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/tools/bundle.rs b/cli/tools/bundle.rs
index 5a42f834e..9420d9c8f 100644
--- a/cli/tools/bundle.rs
+++ b/cli/tools/bundle.rs
@@ -45,7 +45,8 @@ pub async fn bundle(
log::debug!(">>>>> bundle START");
let ps = ProcState::from_options(cli_options).await?;
let graph =
- create_graph_and_maybe_check(module_specifier.clone(), &ps).await?;
+ create_graph_and_maybe_check(vec![module_specifier.clone()], &ps)
+ .await?;
let mut paths_to_watch: Vec<PathBuf> = graph
.specifiers()