@@ -2,7 +2,7 @@ import * as path from "path";
22import { SourceNode } from "source-map" ;
33import * as ts from "typescript" ;
44import { couldNotFindBundleEntryPoint } from "./diagnostics" ;
5- import { getProjectRootDir , resolveFromRootDir } from "./resolve" ;
5+ import { resolveFromRootDir } from "./resolve" ;
66import { EmitHost , TranspiledFile } from "./Transpile" ;
77import { formatPathToLuaPath , trimExtension } from "./utils" ;
88
@@ -23,7 +23,7 @@ export function bundleTranspiledFiles(
2323 }
2424
2525 // For each file: ["<file name>"] = function() <lua content> end,
26- const projectRootDir = getProjectRootDir ( program ) ;
26+ const projectRootDir = program . getCommonSourceDirectory ( ) ;
2727 const moduleTableEntries : SourceChunk [ ] = transpiledFiles . map ( f => moduleSourceNode ( f , projectRootDir ) ) ;
2828
2929 // If any of the modules contains a require for lualib_bundle, add it to the module table.
@@ -51,7 +51,7 @@ export function bundleTranspiledFiles(
5151 return [
5252 diagnostics ,
5353 {
54- fileName : path . join ( getProjectRootDir ( program ) , bundleFile ) ,
54+ fileName : path . join ( program . getCommonSourceDirectory ( ) , bundleFile ) ,
5555 lua : code ,
5656 sourceMap : map . toString ( ) ,
5757 sourceMapNode : moduleTable ,
0 commit comments