diff --git a/plugin/src/features/Compilation/index.tsx b/plugin/src/features/Compilation/index.tsx index 5923c13..264e232 100644 --- a/plugin/src/features/Compilation/index.tsx +++ b/plugin/src/features/Compilation/index.tsx @@ -290,10 +290,13 @@ const Compilation: React.FC = ({ setAccordian }) => { ): Promise => { const files = [] as FileContentMap[]; const pathFiles = await remixClient.fileManager.readdir(`${workspacePath}/${dirPath}`); + for (const [path, entry] of Object.entries(pathFiles)) { if (entry.isDirectory === true) { - const deps = await getFolderFilemapRecursive(workspacePath, path); + const deps = await getFolderFilemapRecursive(workspacePath, dirPath + "/" + path); + for (const dep of deps) files.push(dep); + continue; } @@ -306,6 +309,7 @@ const Compilation: React.FC = ({ setAccordian }) => { file_content: content }); } + return files; };