File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { listenAndServe } from "https://deno.land/std@0.111.0/http/server.ts" ;
22import { MEDIA_TYPES } from './media-type.js' ;
3+ import { main as generateImportmap } from './js/importmap-generator.js' ;
34
45const 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
You can’t perform that action at this time.
0 commit comments