I have set up a repository to showcase an issue I am facing: https://github.com/vileen/lerna-webpack-typescript-aliases-issue (the app does not start properly, but that's not the main concern).
The main question here is how can I enhance importing from the shared package even further to eliminate the need for the src part of the import. Is there a better approach to avoid reexporting?
I experimented with defining webpack aliases, but it did not make a difference. What did have an impact was adding "main": "src/index.tsx" to the package.json file of the shared component. However, this method disrupts TypeScript IntelliSense, making it an imperfect solution.
I considered creating definition files or manually defining the shared module, but these are not ideal either. Having access to the actual code is important, and generating a definition file would not provide much value. Additionally, maintaining it for every new package would be cumbersome.