How can I efficiently share code between different codebases that are all written in TypeScript and constantly being developed?
I am seeking a straightforward solution.
Some of the methods I have attempted include:
1 Utilizing import statements with paths to other projects:
import { type } from '../../otherProj/src/type';
This method has resulted in the following error:
error TS2307: Cannot find module '../../otherProj/src/type'
2 Using npm modules
I have tried installing locally using:
npm i ../otherProj
However, this approach presents issues as I need to update the version of the library for each change or manually uninstall/reinstall it.
3 Implementing git submodule / subtree
I have experimented with utilizing a git submodule.
4 Creating Softlinks / Directory Junctions
Given that we are operating on Windows, we are currently employing the mklink /D /J
method.
Are there any alternative approaches worth exploring?