0

I have 3 NodeJs apps with Typescript code (latest versions). In each one of the apps there is an "src" folder which contains the ts code files and a "dist" folder that contains the js files compiled by Typescript. Now I want to create outside of these apps folders a "common" folder that will contain few ts files that each one of my 3 apps can use and it should be compiled to the "dist" folder of each app separately. Instead of using "rootDir": "./src" I tried using "rootDirs":["../../common", "/.src"] but it didn't work.

1 Answer 1

2

Sounds like you want to create workspaces. The package manager you use should have support for workspaces built-in. Like Yarn Workspaces or NPM workspaces.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.