I am using the TS paths
approach to include the shared
folder in my API project.
Here's a piece of my API's tsconfig.json
file:
The challenge here is that the shared
folder has its own dependencies and package.json
The overall project structure looks like this:
api/
.../package.json
shared/
.../package.json
When compiling API, my dist
folder includes the shared
folder definitions, but it ignores the node_modules
therefore fails during runtime.
Question: How can I tell tsc
compiler to include node_modules
into dist/shared
?
Or should I create a post-compile
step to manually copy it? (doesn't sound clean)