From 85e3d7e9e64d7ed00e5b4b19ac6a1c5cb19c3779 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Sat, 14 Oct 2023 21:53:16 -0700 Subject: [PATCH] modulepreload --- src/render.ts | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/render.ts b/src/render.ts index 81813bffe..7e33a0e9f 100644 --- a/src/render.ts +++ b/src/render.ts @@ -46,6 +46,7 @@ type RenderInternalOptions = function render(parseResult: ParseResult, {path, pages, preview, hash}: RenderOptions & RenderInternalOptions): string { const showSidebar = pages && pages.length > 1; + const imports = getImportMap(parseResult); return ` @@ -54,22 +55,9 @@ ${ } - +${imports.map(([, href]) => ``).join("\n")}