Hello! This is most probably an uncommon issue after a lot searching through various github, SOF discussion, google searches I am writing here. For context, I am creating an Open Source UI Library for a Video Player. The core functionality of player is provided by Shaka Player https://github.com/shaka-project/shaka-player This is a purely JS based library and on top of it I am creating a UI Library using React https://github.com/WINOFFRG/limeplay/tree/shaka-monorepo
The issue: This JS based Player has three versions Compiled, Compiled with Debug and Uncompiled. In the first image you can see how any of the versions are loaded. Earlier to use shaka player in my project I installed it as a NPM Package and created a module of its like this https://github.com/WINOFFRG/limeplay/blob/main/src/types/shaka-player/index.ts
declare module 'shaka-player/dist/shaka-player.ui.debug' {
export = shaka;
}```
And to use it anywhere, I just did this https://github.com/WINOFFRG/limeplay/blob/main/src/hooks/useLimetree.ts#L4
```ts
import shaka from 'shaka-player/dist/shaka-player.ui.debug';
Now this works fine at a small scale but this limits me to just use the shaka-player.ui.debug debug version of player. Also, I am always locked to modify the code of shaka-player If I need. So, I went ahead with monorepo style and closed the style and cloned the shaka-player as a package in my code. Ref. Image 2
I want to create something like in ENV or settings which can help me load any of the versions directly I mentioned and to be able to have the availability of shaka-player as a package globally. So that I can consume maybe like import shaka from 'shaka-player' anywhere. To mention, with reference to Image 1 if I want to use the compiled version I would first need to compiled it manually and for uncompiled I just need to import all those JS files mentioned in the Image 1. Refer Image 3 for the dist of Shaka Player.
Cont. in the bottom