My application has a set of common typescript classes in a directory (and its sub-directories) named fwk.
I am also creating custom components, which at build time are translating into a versioned directory structure. For example, one such component is an AuthProcessor component. This component is directly under my jet-composites (created by the ojet create component command). The AuthProcessor uses the configuration taken from classes declated in the fwk/common/configuration. To tell the typescript compiler, I edited the tsconfig.json and added
"fwk
/*": [
"src/ts/fwk/*"
]
to the paths section.
Now there are at least two points I am not clear about. First and more serious is the runtime compilation issue, which results in a Typescript Error: fwk/common/configuration/CustomConfiguration.ts is not under rootDir (web/ts/jet-composites). This error is during the actual service. So something is going wrong at runtime, leading to the files not getting loaded and hence the component remaining incomplete (oj-incomplete), post rendering.
What is curious is that the rootDir for composite components is being treated as web/ts/jet-composites rather than the src/ts, as mentioned in the tsconfig.json. So there is something about jet-composites that I am missing.
Second, how accurate are VS Code imports intellisense suggestions? In other words, if I take the VS Code not showing compilation issues as a baseline, will my build process go through? Even if it does, I have the more serious first problem.
A related issue seems to be mentioned here. But I cannot find the loop snippet described by the author of that post.
Any ideas?