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

Incremental update of blocks with imports use the wrong paths #202

Closed
mbostock opened this issue Nov 18, 2023 · 2 comments
Closed

Incremental update of blocks with imports use the wrong paths #202

mbostock opened this issue Nov 18, 2023 · 2 comments
Assignees
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

Note the lack of _import here:

Screenshot 2023-11-17 at 5 35 40 PM

Example code is in foo.md:

import {bar} from "./bar.js";

display(bar);
@mbostock mbostock added the bug Something isn’t working label Nov 18, 2023
@mbostock mbostock added this to the Internal access milestone Nov 18, 2023
@mbostock mbostock self-assigned this Nov 19, 2023
@mbostock
Copy link
Member Author

This has been a huge pain doing BI development. We should figure out how to write tests for the preview server…

@mbostock
Copy link
Member Author

Okay, this is more interesting than I expected. The bug is that because we’re now using relative paths for imports (e.g., ./_import/foo.js), the import is computed relative to the client library /_observablehq/client.js not the page. That’s surprising!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

No branches or pull requests

1 participant