Open oscarotero opened 1 year ago
I think it maybe doesn't keep the entry because it can't find the import entry in the code. I'm not sure though.
I think it should keep all entries, even those not found in the code, because it may be present in other places. For example dynamic imports or, like in the Lume case, a task.
The
import_map.json
file generated bydeno vendor
doesn't contain the imports of the existingimport_map.json
. This makes script to fail because these import entries are missing.As an example, Lume uses the following import map:
To vendor a Lume project, the script take 2 lume files and the _config.ts file:
The
vendor/import_map.json
file doesn't include thelume/
import, so it fails.Lume has a
lume vendor
command to rundeno vendor
and fix the newimport_map.json
file by adding automatically the missing imports (https://github.com/lumeland/lume/blob/f9866692391ed4d7500494b9d2b29de0921f9f26/cli/vendor.ts#L55-L63) but I think this is something that Deno should do.