It’d be nice if you could use file attachments in local ES modules. I’m imagining it would work like this:
import {FileAttachment} from "npm:@observablehq/stdlib";
const foo = await FileAttachment("foo.csv").json();
In this case, the path foo.csv would be relative to the current ES module.
The dual meaning of importing the Observable standard library would be a little odd, though. I’m not sure how that would work… and maybe this is a pipe dream.
It’d be nice if you could use file attachments in local ES modules. I’m imagining it would work like this:
In this case, the path
foo.csvwould be relative to the current ES module.The dual meaning of importing the Observable standard library would be a little odd, though. I’m not sure how that would work… and maybe this is a pipe dream.