File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import * as esbuild from 'esbuild'
2020import * as fs from 'fs'
2121import * as path from 'path'
22- import { collectExternalBareSpecifiers , extractTsScriptPaths } from './bundler.js'
23- import { readTsconfigInfo } from './tsconfig.js'
2422
2523const NODE_BUILTINS = new Set ( [
2624 'assert' ,
@@ -75,6 +73,8 @@ export async function generateDeps(entryPoint: string, outRel: string): Promise<
7573 }
7674
7775 const entryDir = path . dirname ( entryAbs )
76+ const { collectExternalBareSpecifiers, extractTsScriptPaths } = await import ( './bundler.js' )
77+ const { readTsconfigInfo } = await import ( './tsconfig.js' )
7878 const htmlContent = fs . readFileSync ( entryAbs , 'utf-8' )
7979 const tsScriptPaths = extractTsScriptPaths ( htmlContent )
8080
@@ -194,7 +194,7 @@ export async function generateDeps(entryPoint: string, outRel: string): Promise<
194194}
195195
196196/** Import map value for a bundled file, relative to the project entry dir. */
197- function importMapValue ( entryDir : string , outFile : string ) : string {
197+ export function importMapValue ( entryDir : string , outFile : string ) : string {
198198 const rel = path . relative ( entryDir , outFile ) . split ( path . sep ) . join ( '/' )
199199 return './' + rel
200200}
You can’t perform that action at this time.
0 commit comments