Skip to content

Commit 4b81de9

Browse files
committed
it appears that dynamic import is not supported on deno deploy
1 parent 8a4271f commit 4b81de9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

deploy-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { listenAndServe } from "https://deno.land/std@0.111.0/http/server.ts";
22
import { MEDIA_TYPES } from './media-type.js';
3+
import { main as generateImportmap } from './js/importmap-generator.js';
34

45
const assetMap = {
56
'/': './deploy.html',
@@ -91,8 +92,7 @@ async function requestHandler(request) {
9192

9293
if (contentTypeHTML) {
9394
const content = await Deno.readTextFile(assetPath);
94-
const { main } = await import('./js/importmap-generator.js');
95-
const importMap = await main();
95+
const importMap = await generateImportmap();
9696

9797
const [beforeImportmap, afterImportmap] = content.split("//__importmap");
9898
const html = `${beforeImportmap}${importMap}${afterImportmap}`;
@@ -182,7 +182,7 @@ async function requestHandler(request) {
182182
}
183183

184184
return new Response(null, {
185-
status: 404,
185+
status: 404,
186186
});
187187
}
188188

0 commit comments

Comments
 (0)