You can use lnk-cli to create a directory link.
Here’s my setup using TypeScript:
.ts
files I want to share)Only include the code files you want (no
package.json
,tsconfig.json
, etc.)
See the highlighted text. Just add the "lnk" command to create the directory link before watching the TypeScript files.
The
common
folder has the main code, so you can ignore these linked folders. Any changes in one of the three locations (common, functions/common, or server/common) will automatically reflect in all linked locations.
Now you can import the common files like this. (No additional need to adjust tsconfig.json)