Skip to content
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

feat: make deno vendor work with an existing import map by modifying it #14824

Closed

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jun 8, 2022

This is based on an idea from @rtpg:

  1. Moves the import_map.json to be in the root directory instead of vendor folder.
  2. Specific usages of remote dependencies in local code is added to the "imports" (ex. "https://localhost/mod.ts": "./vendor/localhost/mod.ts") instead of a general one (ex. "https://localhost/": "./vendor/localhost/")... so when a new remote specifier is used then deno vendor needs to be run again.
  3. Strips all vendor output folder entries from the import map before vendoring in order to allow re-vendoring.

Closes #13697

@dsherret dsherret changed the title feat: make deno vendor work with an existing import map feat: make deno vendor work with an existing import map by modifying it Jun 9, 2022
@dsherret
Copy link
Member Author

dsherret commented Jun 9, 2022

This sadly does not work because we need to modify import map entries like "$twind": "https://esm.sh/[email protected]" to point to the vendored location. We're going to continue using a vendor/import_map.json file. I will open a new PR that makes these changes.

@dsherret dsherret closed this Jun 9, 2022
@dsherret dsherret deleted the deno_vendor_existing_import_map branch June 9, 2022 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno vendor does not work with existing import map with bare specifier mapping
1 participant