I am currently in the process of developing a repository that houses a collection of reusable Angular components and modules. One specific module I implemented is called 'SharedComponentsModule', which serves as an export hub for all components within this repository.
import {SharedComponentsModule} from 'sharedLibrary/sharedcomponent.module';
...
@NgModule({
imports: [
CommonModule
],
declarations: [
FirstComponent,
SecondComponent,
ThirdComponent
],
exports: [
CommonModule,
SecondComponent,
ThirdComponent
],
providers: [],
})
export class SharedComponentsModule {}
Given that this repository will be utilized across multiple angular applications, it resides outside the application directory (e.g., C:\shared_tools). All shared components and modules are located within this external directory structure. I attempted to configure paths in the tsconfig.json file to enable direct access to this repository, but encountered issues. Both my IDE and the angular app failed to recognize the references. It seems like there might be a misconception regarding the correct setup procedure. Can someone provide guidance on how to accurately reference an external directory? Any assistance would be greatly appreciated.
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"sharedLibrary": ["C:\\shared_tools\\*"]
},