-
In the notebook context, if I enter 'Files' into a JavaScript cell, I get an Object. However if I try import { Files } from "@observablehq/stdlib"; in Framework, it returns The I have tried approaches like import * as Files from "@observablehq/stdlib/files/index.js"; and const Files = await (async () => ({
buffer: await import("https://raw.githubusercontent.com/observablehq/stdlib/main/src/files/buffer.js"),
text: await import("https://raw.githubusercontent.com/observablehq/stdlib/main/src/files/text.js"),
url: await import("https://raw.githubusercontent.com/observablehq/stdlib/main/src/files/url.js")
}))(); but I can't seem to get anything working. Any tips or insights? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
... I may have figured it out. I created a export * as buffer from "https://cdn.jsdelivr.net/gh/observablehq/stdlib@main/src/files/buffer.js";
export * as text from "https://cdn.jsdelivr.net/gh/observablehq/stdlib@main/src/files/text.js";
export * as url from "https://cdn.jsdelivr.net/gh/observablehq/stdlib@main/src/files/url.js"; Then in Framework imported it normally: import * as Files from "/components/files.js"; Seems to have done the trick! :) |
Beta Was this translation helpful? Give feedback.
-
Deprecated and removed: https://observablehq.com/framework/convert#standard-library |
Beta Was this translation helpful? Give feedback.
Deprecated and removed: https://observablehq.com/framework/convert#standard-library