fix: use new project directory path to find tsconfig files
This commit is contained in:
parent
5a63ab7265
commit
474102aa14
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user