Skip to content

Reactive updates don’t work for modules that load data loaders #1661

@mbostock

Description

@mbostock

Consider test.md:

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

display(await test());
```

And test.js:

import {FileAttachment} from "npm:@observablehq/stdlib";

export async function test() {
  return FileAttachment("./test.txt").text();
}

And test.txt.js:

process.stdout.write("hello");

If you edit test.txt.js, it should change the hash of test.js, and cause the page /test to update. But it doesn’t because getModuleHash doesn’t allow for a FileAttachment being backed by a data loader.

Metadata

Metadata

Assignees

Labels

bugSomething isn’t working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions