fix: use new project directory path to find tsconfig files

This commit is contained in:
James Murdza 2024-11-02 13:28:21 -06:00
parent 5a63ab7265
commit 474102aa14

View File

@ -218,7 +218,6 @@ export default function CodeEditor({
let mergedConfig: any = { compilerOptions: {} } let mergedConfig: any = { compilerOptions: {} }
for (const file of tsconfigFiles) { for (const file of tsconfigFiles) {
const containerId = file.id.split("/").slice(0, 2).join("/")
const content = await fetchFileContent(file.id) const content = await fetchFileContent(file.id)
try { try {
@ -228,8 +227,7 @@ export default function CodeEditor({
if (tsConfig.references) { if (tsConfig.references) {
for (const ref of tsConfig.references) { for (const ref of tsConfig.references) {
const path = ref.path.replace("./", "") const path = ref.path.replace("./", "")
const fileId = `${containerId}/${path}` const refContent = await fetchFileContent(path)
const refContent = await fetchFileContent(fileId)
const referenceTsConfig = JSON.parse(refContent) const referenceTsConfig = JSON.parse(refContent)
// Merge configurations // Merge configurations