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

Support npm protocol imports in imported local modules #115

Closed
mbostock opened this issue Nov 8, 2023 · 0 comments
Closed

Support npm protocol imports in imported local modules #115

mbostock opened this issue Nov 8, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mbostock
Copy link
Member

mbostock commented Nov 8, 2023

For example, if I have a JavaScript cell in a Markdown file docs/index.md:

```js
import {foo}  from "./foo.js";
```

And then foo.js imports D3 using an npm protocol import:

import * as d3 from "npm:d3";

export const foo = d3.utcDay();

The import will fail because it is not rewritten (to https://cdn.jsdelivr.net/npm/d3/+esm). This was originally supported with import maps, but since we removed import maps in #101 to improve incremental update #14, it regressed. But we need to rewrite imported local modules anyway for #78.

@mbostock mbostock added the enhancement New feature or request label Nov 8, 2023
@mbostock mbostock mentioned this issue Nov 8, 2023
1 task
@mbostock mbostock self-assigned this Nov 9, 2023
@mbostock mbostock added this to the Early access milestone Nov 13, 2023
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

No branches or pull requests

1 participant