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

Deduplicate imports after resolving in renderModule #1718

Closed
Fil opened this issue Oct 3, 2024 · 0 comments · Fixed by #1719
Closed

Deduplicate imports after resolving in renderModule #1718

Fil opened this issue Oct 3, 2024 · 0 comments · Fixed by #1719
Assignees
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Oct 3, 2024

this is not always deduplicated in exported modules:

import "../../_npm/[email protected]/_esm.js";
import "../../_npm/[email protected]/_esm.js";

Mike says:

it’s because we deduplicate before resolving rather than after. So here there are two global imports of D3: the chart.js module imports npm:d3, and Plot imports npm:d3@^7.9.0. These are two distinct specifiers prior to resolving, but they both resolve to npm:[email protected] after. We can fix this in renderModule.

@Fil Fil added the enhancement New feature or request label Oct 3, 2024
@mbostock mbostock changed the title deduplicate imports (more) Deduplicate imports after resolving in renderModule Oct 3, 2024
@mbostock mbostock self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants