-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support --importmap
with deno bundle
#4379
Comments
I suspect so. There really shouldn't be much more than accepting it just like the |
diff --git a/cli/flags.rs b/cli/flags.rs
index 9e1fbf5d..b954ea73 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -618,6 +618,7 @@ To change installation directory use -d/--dir flag:
fn bundle_subcommand<'a, 'b>() -> App<'a, 'b> {
SubCommand::with_name("bundle")
+ .arg(importmap_arg())
.arg(
Arg::with_name("source_file")
.takes_value(true) I tried that and got the following error instead:
It seems that the argument is parsed correctly but the |
I don't have everything in my head at the moment to give you strong guidence, but if it were me, I would compare:
With:
The TypeScript |
example:deno install --unstable --importmap=import_map.json test test.ts |
Reproduction steps
index.js
import-map.json
deno bundle --importmap=import-map.json index.js
Example where this can be reproduced: https://github.com/davidbailey00/deno-npm-demo
Expected result
It works, like with
deno --importmap=import-map.json index.js
Actual result
The following output is displayed:
Additional notes
I would love to create a PR to support this, but might need some pointing in the right direction since I'm relatively new to Rust programming! Would it be a matter of adding
.arg(importmap_arg())
to thebundle_subcommand
function?Based on #2687 I would expect this to already work, though it looks the behaviour has changed since this PR?
The text was updated successfully, but these errors were encountered: