You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are working in a huge monorepo setup with hundreds of packages. Now if an interface is imported from an "external" package - just another package that i'm currently scoped into - it won't pick up this file and parse it. This results in missing properties that basically would be delivered by this imported interface/type.
Could be fixed with a patch in the makeFsImporter.ts but i didn't made a pull request yet - i just tried it out very specifically for our own repository, but it would need further work to make a generic solution out of it:
functionresolveImportedValue(path: ImportPath,name: string,file: FileState,seen=newSet<string>(),): NodePath|null{// Bail if no filename was provided for the current source file.// Also never traverse into react itself.letsource=path.node.source?.value;let{ filename }=file.opts;// Customization: add support to resolve packages from blocks, segments, and libraries in iso monorepoif((typeoffilename==="string"&&source?.startsWith("@blocks"))||source?.startsWith("@segments")||source?.startsWith("@libraries")){filename=`${getRepoRoot(filenameasstring)}/${source.replace("@","")}/src/index.ts`;source="./index";}// Customization: endif(!source||!filename||source==="react"){returnnull;}
The text was updated successfully, but these errors were encountered:
We are working in a huge monorepo setup with hundreds of packages. Now if an interface is imported from an "external" package - just another package that i'm currently scoped into - it won't pick up this file and parse it. This results in missing properties that basically would be delivered by this imported interface/type.
Could be fixed with a patch in the
makeFsImporter.ts
but i didn't made a pull request yet - i just tried it out very specifically for our own repository, but it would need further work to make a generic solution out of it:The text was updated successfully, but these errors were encountered: