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

implicit /+esm for JavaScript extensions #1174

Merged
merged 2 commits into from Mar 31, 2024
Merged

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Mar 30, 2024

EDIT: We reverted this in #1186 as it was breaking duckdb-wasm.


This makes imports such as this work out of the box:

import Deck from "npm:deck.gl/dist.min.js";
import mermaid from "npm:mermaid/dist/mermaid.esm.min.mjs";

Previously these imports would error because they require /+esm; now the /+esm is added implicitly so it “just works.”

This also fixes the default entry for deck.gl, so that this now works, too:

import Deck from "npm:deck.gl";

(I did see an error once about “multiple versions of luma detected”… but couldn’t reproduce it reliably.)

@mbostock mbostock enabled auto-merge (squash) March 30, 2024 23:16
@mbostock mbostock merged commit ac66ff4 into main Mar 31, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/implicit-esm branch March 31, 2024 09:07
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.

None yet

2 participants