I am working on a monorepo that consists of multiple clients, and I am trying to determine the best way to handle axios in this project.
Here are some key points:
- Each client may or may not have the same interceptors.
- Clients share some API endpoints (shared composables like user.composable -> getUser(): IUser), but they also have their own unique ones (user.composable -> getClientXData(): unknown) which should only be compiled and visible within their respective builds.
monorepo/
├─ apps/
│ ├─ client1/
│ │ ├─ composables/
│ │ │ ├─ user.composable.ts
│ ├─ client2/
│ │ ├─ composables/
│ │ │ ├─ user.composable.ts
│ ├─ client3/
│ │ ├─ composables/
│ │ │ ├─ user.composable.ts
├─ packages/
│ ├─ composables/
│ │ ├─ user.composable.ts
│ ├─ models/
│ │ ├─ IUser.ts
Do you have any suggestions on how to effectively manage this situation?