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

export maps with entry point only conditions are showing the condition as part of the generated import map key (ex. d3) #1406

Closed
thescientist13 opened this issue Feb 7, 2025 · 0 comments · Fixed by #1413
Assignees
Labels
bug Something isn't working CLI v0.31.1
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Feb 7, 2025

What happened?

As reported in #1405 when trying to use a library like d3, there was an error being reported in the browser
Image

Steps to reproduce

  1. Install d3 as a dependency (or similar package that has similar export conditions)
  2. Run greenwood develop

Repro repo - https://github.com/ProjectEvergreen/greenwood-getting-started/compare/debug-d3?expand=1

Environment

Greenwood v0.31.0

Additional Context

This is the export map for d3

"exports": {
  "umd": "./dist/d3.min.js",
  "default": "./src/index.js"
},

Looking into the generated import map, can see that its sub condition only exports are getting included in the key
Image

@thescientist13 thescientist13 added bug Something isn't working CLI labels Feb 7, 2025
@thescientist13 thescientist13 added this to the 1.0 milestone Feb 7, 2025
@thescientist13 thescientist13 self-assigned this Feb 7, 2025
@thescientist13 thescientist13 changed the title export maps with entry point only are showing the condition as part of the generated import map key export maps with entry point only conditions are showing the condition as part of the generated import map key Feb 7, 2025
@thescientist13 thescientist13 changed the title export maps with entry point only conditions are showing the condition as part of the generated import map key export maps with entry point only conditions are showing the condition as part of the generated import map key (ex. d3) Feb 7, 2025
@thescientist13 thescientist13 moved this from 🔖 Ready to 👀 In review in [Greenwood] Phase 10 - Ecosystem Compat Feb 9, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in [Greenwood] Phase 10 - Ecosystem Compat Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI v0.31.1
Projects
1 participant