Skip to content

add the file path to the hash #1373

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export async function build(
const sourcePath = join(root, specifier);
effects.output.write(`${faint("build")} ${sourcePath} ${faint("→")} `);
const contents = await bundleStyles({path: sourcePath, minify: true});
const hash = createHash("sha256").update(contents).digest("hex").slice(0, 8);
const hash = createHash("sha256").update(contents).update(specifier).digest("hex").slice(0, 8);
const ext = extname(specifier);
const alias = `/${join("_import", dirname(specifier), `${basename(specifier, ext)}.${hash}${ext}`)}`;
aliases.set(resolveStylesheetPath(root, specifier), alias);
Expand All @@ -166,7 +166,7 @@ export async function build(
}
effects.output.write(`${faint("copy")} ${sourcePath} ${faint("→")} `);
const contents = await readFile(sourcePath);
const hash = createHash("sha256").update(contents).digest("hex").slice(0, 8);
const hash = createHash("sha256").update(contents).update(file).digest("hex").slice(0, 8);
const ext = extname(file);
const alias = `/${join("_file", dirname(file), `${basename(file, ext)}.${hash}${ext}`)}`;
aliases.set(loaders.resolveFilePath(file), alias);
Expand Down
3 changes: 2 additions & 1 deletion test/build-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ describe("build", () => {
? it.only
: skip ||
(name.endsWith(".posix") && os.platform() === "win32") ||
(name.endsWith(".win32") && os.platform() !== "win32")
(name.endsWith(".win32") && os.platform() !== "win32") ||
(name.endsWith(".darwin-public") && os.platform() !== "darwin")
? it.skip
: it)(`${inputRoot}/${name}`, async () => {
const actualDir = join(outputRoot, `${outname}-changed`);
Expand Down
1 change: 1 addition & 0 deletions test/input/build/case-sensitive.darwin-public/ImAgE.jpg
7 changes: 7 additions & 0 deletions test/input/build/case-sensitive.darwin-public/PAGEUPPER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
style: STYLE.css
---

# An upper PAGE calling an IMAGE

<img src="IMAGE.jpg">
3 changes: 3 additions & 0 deletions test/input/build/case-sensitive.darwin-public/StYlE.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main {
border: solid 1px red;
}
7 changes: 7 additions & 0 deletions test/input/build/case-sensitive.darwin-public/pagelower.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
style: style.css
---

# A lower page calling an image

<img src="image.jpg">
8 changes: 4 additions & 4 deletions test/output/build/archives.posix/tar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./dynamic-tar-gz/does-not-exist.txt", {"name":"./dynamic-tar-gz/does-not-exist.txt","mimeType":"text/plain","path":"./dynamic-tar-gz/does-not-exist.txt"});
registerFile("./dynamic-tar-gz/file.txt", {"name":"./dynamic-tar-gz/file.txt","mimeType":"text/plain","path":"./_file/dynamic-tar-gz/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./dynamic-tar-gz/file.txt", {"name":"./dynamic-tar-gz/file.txt","mimeType":"text/plain","path":"./_file/dynamic-tar-gz/file.282d8294.txt","lastModified":/* ts */1706742000000});
registerFile("./dynamic-tar/does-not-exist.txt", {"name":"./dynamic-tar/does-not-exist.txt","mimeType":"text/plain","path":"./dynamic-tar/does-not-exist.txt"});
registerFile("./dynamic-tar/file.txt", {"name":"./dynamic-tar/file.txt","mimeType":"text/plain","path":"./_file/dynamic-tar/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./dynamic-tar/file.txt", {"name":"./dynamic-tar/file.txt","mimeType":"text/plain","path":"./_file/dynamic-tar/file.81db32c1.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tar/does-not-exist.txt", {"name":"./static-tar/does-not-exist.txt","mimeType":"text/plain","path":"./static-tar/does-not-exist.txt"});
registerFile("./static-tar/file.txt", {"name":"./static-tar/file.txt","mimeType":"text/plain","path":"./_file/static-tar/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tgz/file.txt", {"name":"./static-tgz/file.txt","mimeType":"text/plain","path":"./_file/static-tgz/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tar/file.txt", {"name":"./static-tar/file.txt","mimeType":"text/plain","path":"./_file/static-tar/file.4ee5ee70.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tgz/file.txt", {"name":"./static-tgz/file.txt","mimeType":"text/plain","path":"./_file/static-tgz/file.ded9d524.txt","lastModified":/* ts */1706742000000});

define({id: "d5134368", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
display(await(
Expand Down
4 changes: 2 additions & 2 deletions test/output/build/archives.posix/zip.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import {define} from "./_observablehq/client.js";
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./dynamic/file.txt", {"name":"./dynamic/file.txt","mimeType":"text/plain","path":"./_file/dynamic/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./dynamic/file.txt", {"name":"./dynamic/file.txt","mimeType":"text/plain","path":"./_file/dynamic/file.e6632719.txt","lastModified":/* ts */1706742000000});
registerFile("./dynamic/not-found.txt", {"name":"./dynamic/not-found.txt","mimeType":"text/plain","path":"./dynamic/not-found.txt"});
registerFile("./static/file.txt", {"name":"./static/file.txt","mimeType":"text/plain","path":"./_file/static/file.d9014c46.txt","lastModified":/* ts */1706742000000});
registerFile("./static/file.txt", {"name":"./static/file.txt","mimeType":"text/plain","path":"./_file/static/file.cdefba74.txt","lastModified":/* ts */1706742000000});
registerFile("./static/not-found.txt", {"name":"./static/not-found.txt","mimeType":"text/plain","path":"./static/not-found.txt"});

define({id: "d3b9d0ee", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
Expand Down
4 changes: 2 additions & 2 deletions test/output/build/archives.win32/tar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./static-tar/does-not-exist.txt", {"name":"./static-tar/does-not-exist.txt","mimeType":"text/plain","path":"./static-tar/does-not-exist.txt"});
registerFile("./static-tar/file.txt", {"name":"./static-tar/file.txt","mimeType":"text/plain","path":"./_file/static-tar/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tgz/file.txt", {"name":"./static-tgz/file.txt","mimeType":"text/plain","path":"./_file/static-tgz/file.c93138d8.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tar/file.txt", {"name":"./static-tar/file.txt","mimeType":"text/plain","path":"./_file/static-tar/file.4ee5ee70.txt","lastModified":/* ts */1706742000000});
registerFile("./static-tgz/file.txt", {"name":"./static-tgz/file.txt","mimeType":"text/plain","path":"./_file/static-tgz/file.ded9d524.txt","lastModified":/* ts */1706742000000});

define({id: "d5134368", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
display(await(
Expand Down
2 changes: 1 addition & 1 deletion test/output/build/archives.win32/zip.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import {define} from "./_observablehq/client.js";
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./static/file.txt", {"name":"./static/file.txt","mimeType":"text/plain","path":"./_file/static/file.d9014c46.txt","lastModified":/* ts */1706742000000});
registerFile("./static/file.txt", {"name":"./static/file.txt","mimeType":"text/plain","path":"./_file/static/file.cdefba74.txt","lastModified":/* ts */1706742000000});
registerFile("./static/not-found.txt", {"name":"./static/not-found.txt","mimeType":"text/plain","path":"./static/not-found.txt"});

define({id: "d3b9d0ee", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
Expand Down
44 changes: 44 additions & 0 deletions test/output/build/case-sensitive.darwin-public/PAGEUPPER.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>An upper PAGE calling an IMAGE</title>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
<link rel="preload" as="style" href="./_import/STYLE.ada7ba12.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
<link rel="stylesheet" type="text/css" href="./_import/STYLE.ada7ba12.css">
<link rel="modulepreload" href="./_observablehq/client.js">
<link rel="modulepreload" href="./_observablehq/runtime.js">
<link rel="modulepreload" href="./_observablehq/stdlib.js">
<script type="module">

import "./_observablehq/client.js";

</script>
<input id="observablehq-sidebar-toggle" type="checkbox" title="Toggle sidebar">
<label id="observablehq-sidebar-backdrop" for="observablehq-sidebar-toggle"></label>
<nav id="observablehq-sidebar">
<ol>
<label id="observablehq-sidebar-close" for="observablehq-sidebar-toggle"></label>
<li class="observablehq-link"><a href="./">Home</a></li>
</ol>
<ol>
<li class="observablehq-link observablehq-link-active"><a href="./PAGEUPPER">An upper PAGE calling an IMAGE</a></li>
<li class="observablehq-link"><a href="./pagelower">A lower page calling an image</a></li>
</ol>
</nav>
<script>{/* redacted init script */}</script>
<aside id="observablehq-toc" data-selector="h1:not(:first-of-type)[id], h2:first-child[id], :not(h1) + h2[id]">
<nav>
</nav>
</aside>
<div id="observablehq-center">
<main id="observablehq-main" class="observablehq">
<h1 id="an-upper-page-calling-an-image" tabindex="-1"><a class="observablehq-header-anchor" href="#an-upper-page-calling-an-image">An upper PAGE calling an IMAGE</a></h1>
<img src="./_file/IMAGE.f6f20a97.jpg">
</main>
<footer id="observablehq-footer">
<nav><a rel="prev" href="./"><span>Home</span></a><a rel="next" href="./pagelower"><span>A lower page calling an image</span></a></nav>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-01-10T16:00:00">Jan 10, 2024</a>.</div>
</footer>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main{border:solid 1px red}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main{border:solid 1px red}
Empty file.
Empty file.
Empty file.
44 changes: 44 additions & 0 deletions test/output/build/case-sensitive.darwin-public/pagelower.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>A lower page calling an image</title>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
<link rel="preload" as="style" href="./_import/style.51174bcc.css">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&amp;display=swap" crossorigin>
<link rel="stylesheet" type="text/css" href="./_import/style.51174bcc.css">
<link rel="modulepreload" href="./_observablehq/client.js">
<link rel="modulepreload" href="./_observablehq/runtime.js">
<link rel="modulepreload" href="./_observablehq/stdlib.js">
<script type="module">

import "./_observablehq/client.js";

</script>
<input id="observablehq-sidebar-toggle" type="checkbox" title="Toggle sidebar">
<label id="observablehq-sidebar-backdrop" for="observablehq-sidebar-toggle"></label>
<nav id="observablehq-sidebar">
<ol>
<label id="observablehq-sidebar-close" for="observablehq-sidebar-toggle"></label>
<li class="observablehq-link"><a href="./">Home</a></li>
</ol>
<ol>
<li class="observablehq-link"><a href="./PAGEUPPER">An upper PAGE calling an IMAGE</a></li>
<li class="observablehq-link observablehq-link-active"><a href="./pagelower">A lower page calling an image</a></li>
</ol>
</nav>
<script>{/* redacted init script */}</script>
<aside id="observablehq-toc" data-selector="h1:not(:first-of-type)[id], h2:first-child[id], :not(h1) + h2[id]">
<nav>
</nav>
</aside>
<div id="observablehq-center">
<main id="observablehq-main" class="observablehq">
<h1 id="a-lower-page-calling-an-image" tabindex="-1"><a class="observablehq-header-anchor" href="#a-lower-page-calling-an-image">A lower page calling an image</a></h1>
<img src="./_file/image.a6189c24.jpg">
</main>
<footer id="observablehq-footer">
<nav><a rel="prev" href="./PAGEUPPER"><span>An upper PAGE calling an IMAGE</span></a></nav>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-01-10T16:00:00">Jan 10, 2024</a>.</div>
</footer>
</div>
4 changes: 2 additions & 2 deletions test/output/build/fetches/foo.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import {define} from "./_observablehq/client.js";
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./foo/foo-data.csv", {"name":"./foo/foo-data.csv","mimeType":"text/csv","path":"./_file/foo/foo-data.24ef4634.csv","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.json", {"name":"./foo/foo-data.json","mimeType":"application/json","path":"./_file/foo/foo-data.67358ed8.json","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.csv", {"name":"./foo/foo-data.csv","mimeType":"text/csv","path":"./_file/foo/foo-data.30c71216.csv","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.json", {"name":"./foo/foo-data.json","mimeType":"application/json","path":"./_file/foo/foo-data.b400d8ad.json","lastModified":/* ts */1706742000000});

define({id: "47a695da", inputs: ["display"], outputs: ["fooJsonData","fooCsvData"], body: async (display) => {
const {fooJsonData, fooCsvData} = await import("./_import/foo/foo.6fd063d5.js");
Expand Down
8 changes: 4 additions & 4 deletions test/output/build/fetches/top.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import {define} from "./_observablehq/client.js";
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./foo/foo-data.csv", {"name":"./foo/foo-data.csv","mimeType":"text/csv","path":"./_file/foo/foo-data.24ef4634.csv","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.json", {"name":"./foo/foo-data.json","mimeType":"application/json","path":"./_file/foo/foo-data.67358ed8.json","lastModified":/* ts */1706742000000});
registerFile("./top-data.csv", {"name":"./top-data.csv","mimeType":"text/csv","path":"./_file/top-data.24ef4634.csv","lastModified":/* ts */1706742000000});
registerFile("./top-data.json", {"name":"./top-data.json","mimeType":"application/json","path":"./_file/top-data.67358ed8.json","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.csv", {"name":"./foo/foo-data.csv","mimeType":"text/csv","path":"./_file/foo/foo-data.30c71216.csv","lastModified":/* ts */1706742000000});
registerFile("./foo/foo-data.json", {"name":"./foo/foo-data.json","mimeType":"application/json","path":"./_file/foo/foo-data.b400d8ad.json","lastModified":/* ts */1706742000000});
registerFile("./top-data.csv", {"name":"./top-data.csv","mimeType":"text/csv","path":"./_file/top-data.1b4c59ba.csv","lastModified":/* ts */1706742000000});
registerFile("./top-data.json", {"name":"./top-data.json","mimeType":"application/json","path":"./_file/top-data.34cb96f2.json","lastModified":/* ts */1706742000000});

define({id: "cb908c08", inputs: ["display"], outputs: ["fooCsvData","fooJsonData","topCsvData","topJsonData"], body: async (display) => {
const {fooCsvData, fooJsonData, topCsvData, topJsonData} = await import("./_import/top.d8f5cc36.js");
Expand Down
12 changes: 6 additions & 6 deletions test/output/build/files/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import {define} from "./_observablehq/client.js";
import {registerFile} from "./_observablehq/stdlib.js";

registerFile("./file-top.csv", {"name":"./file-top.csv","mimeType":"text/csv","path":"./_file/file-top.01a7ce0a.csv","lastModified":/* ts */1706742000000});
registerFile("./observable logo.png", {"name":"./observable logo.png","mimeType":"image/png","path":"./_file/observable logo.b620bd08.png","lastModified":/* ts */1706742000000});
registerFile("./subsection/file-sub.csv", {"name":"./subsection/file-sub.csv","mimeType":"text/csv","path":"./_file/subsection/file-sub.72c2c61c.csv","lastModified":/* ts */1706742000000});
registerFile("./file-top.csv", {"name":"./file-top.csv","mimeType":"text/csv","path":"./_file/file-top.d4f763d3.csv","lastModified":/* ts */1706742000000});
registerFile("./observable logo.png", {"name":"./observable logo.png","mimeType":"image/png","path":"./_file/observable logo.2c985a2c.png","lastModified":/* ts */1706742000000});
registerFile("./subsection/file-sub.csv", {"name":"./subsection/file-sub.csv","mimeType":"text/csv","path":"./_file/subsection/file-sub.c2b09af4.csv","lastModified":/* ts */1706742000000});
registerFile("./unknown-mime-extension.really", {"name":"./unknown-mime-extension.really","path":"./unknown-mime-extension.really"});

define({id: "10037545", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
Expand Down Expand Up @@ -64,14 +64,14 @@
</aside>
<div id="observablehq-center">
<main id="observablehq-main" class="observablehq">
<link rel="stylesheet" href="./_file/custom-styles.b072c9c8.css">
<link rel="stylesheet" href="./_file/subsection/additional-styles.3a854b3a.css">
<link rel="stylesheet" href="./_file/custom-styles.d7ea2bb5.css">
<link rel="stylesheet" href="./_file/subsection/additional-styles.24b10888.css">
<link rel="stylesheet" href="https://example.com/style.css">
<div id="cell-10037545" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
<div id="cell-453a8147" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
<div id="cell-444c421e" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
<div id="cell-cee3ab67" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
<p><img src="./_file/observable%20logo%20small.8a915536.png" alt=""></p>
<p><img src="./_file/observable%20logo%20small.93dd2664.png" alt=""></p>
</main>
<footer id="observablehq-footer">
<nav><a rel="prev" href="./"><span>Home</span></a><a rel="next" href="./subsection/subfiles"><span>Untitled</span></a></nav>
Expand Down
8 changes: 4 additions & 4 deletions test/output/build/files/subsection/subfiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import {define} from "../_observablehq/client.js";
import {registerFile} from "../_observablehq/stdlib.js";

registerFile("../file-top.csv", {"name":"../file-top.csv","mimeType":"text/csv","path":"../_file/file-top.01a7ce0a.csv","lastModified":/* ts */1706742000000});
registerFile("./file-sub.csv", {"name":"./file-sub.csv","mimeType":"text/csv","path":"../_file/subsection/file-sub.72c2c61c.csv","lastModified":/* ts */1706742000000});
registerFile("../file-top.csv", {"name":"../file-top.csv","mimeType":"text/csv","path":"../_file/file-top.d4f763d3.csv","lastModified":/* ts */1706742000000});
registerFile("./file-sub.csv", {"name":"./file-sub.csv","mimeType":"text/csv","path":"../_file/subsection/file-sub.c2b09af4.csv","lastModified":/* ts */1706742000000});

define({id: "ef9a31ef", inputs: ["FileAttachment","display"], body: async (FileAttachment,display) => {
display(await(
Expand Down Expand Up @@ -50,8 +50,8 @@
</aside>
<div id="observablehq-center">
<main id="observablehq-main" class="observablehq">
<link rel="stylesheet" href="../_file/custom-styles.b072c9c8.css">
<link rel="stylesheet" href="../_file/subsection/additional-styles.3a854b3a.css">
<link rel="stylesheet" href="../_file/custom-styles.d7ea2bb5.css">
<link rel="stylesheet" href="../_file/subsection/additional-styles.24b10888.css">
<div id="cell-ef9a31ef" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
<div id="cell-834ecf9f" class="observablehq observablehq--block"><span class="observablehq-loading"></span></div>
</main>
Expand Down
2 changes: 1 addition & 1 deletion test/output/build/imports/foo/foo.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import {define} from "../_observablehq/client.js";
import {registerFile} from "../_observablehq/stdlib.js";

registerFile("../top.js", {"name":"../top.js","mimeType":"text/javascript","path":"../_file/top.a53c5d5b.js","lastModified":/* ts */1706742000000});
registerFile("../top.js", {"name":"../top.js","mimeType":"text/javascript","path":"../_file/top.f29fa6df.js","lastModified":/* ts */1706742000000});

define({id: "261e010e", inputs: ["display","FileAttachment"], outputs: ["d3","bar","top"], body: async (display,FileAttachment) => {
const [d3, {bar}, {top}] = await Promise.all([import("../_npm/[email protected]/_esm.js"), import("../_import/bar/bar.13bb8056.js"), import("../_import/top.160847a6.js")]);
Expand Down
2 changes: 1 addition & 1 deletion test/output/build/imports/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<main id="observablehq-main" class="observablehq">
<h1 id="scripts" tabindex="-1"><a class="observablehq-header-anchor" href="#scripts">Scripts</a></h1>
<script src="./_import/top.160847a6.js" type="module"></script>
<script src="./_file/top.a53c5d5b.js" type="other"></script>
<script src="./_file/top.f29fa6df.js" type="other"></script>
</main>
<footer id="observablehq-footer">
<nav><a rel="prev" href="./"><span>Home</span></a><a rel="next" href="./foo/foo"><span>Foo</span></a></nav>
Expand Down
Loading