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: reinstate trace install #171

Merged
merged 5 commits into from
Aug 21, 2022
Merged

feat: reinstate trace install #171

merged 5 commits into from
Aug 21, 2022

Conversation

guybedford
Copy link
Member

This reinstates generator.traceInstall, instead of the recently attempted generator.pin name change.

traceInstall is then updated to always install traces into top-level imports rather than scopes, so it behaves like a full local install operator as opposed to making scopes that might be orphaned later on.

traceInstall effectively stops on bare specifiers, moving to scoped installs after that. This makes it useful for both adding local mappings (eg generator.traceInstall('#local') to add a local package.json "imports" map), and external (generator.traceInstall('https://site.com/external.js') - still populating "imports").

Since htmlInject uses this internally this then fully matches the expectations of HTML tracing as well.

@guybedford guybedford merged commit 3cd53fd into main Aug 21, 2022
@guybedford guybedford deleted the trace-install-redux branch August 21, 2022 14:35
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.

1 participant