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

Automatic env detection from input map #145

Closed
guybedford opened this issue Jul 18, 2022 · 2 comments
Closed

Automatic env detection from input map #145

guybedford opened this issue Jul 18, 2022 · 2 comments

Comments

@guybedford
Copy link
Member

Now that we are doing comprehensive input map analysis and decomposition, we can also possibly detect the conditional environment from the input map based on what resolutions are present.

This could also env to be defaulted correctly when not otherwise provided.

Although not full-proof, since having no env mappings would effectively lose this information, it may well provide a good enough approach to this long-standing problem.

@Bubblyworld
Copy link
Contributor

Just some notes for my future brain, we chatted about this and came to the conclusion that having an explicit "env" field in the output maps has a lot of benefits, like making users aware that import maps are environment specific by nature. On the other hand it will cause some warnings, so we should probably revisit this once jspm gets traction.

@guybedford
Copy link
Member Author

Let's move this discussion into being tracked as lockfile support in #262 for now. We can always reopen this approach if the decisions change though.

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

No branches or pull requests

2 participants