Created by: CarlRibbegaardh
I've added 2 environment variables. TSCONFIG_BUILD and TSCONFIG_WATCH. They are used for setting a custom tsconfig in a monorepo setting.
The reason for this is when a tsconfig.json inherits a base tsconfig with all interrnal package folders defined in order to facilitate easy navigation from the outermost projects into components inside library projects, it causes the build process to navigate through the source files instead of the build/dist folders of the library project builds. This is usually solved by updating the tsconfig on the fly before react-scripts build
or copying between build and edit mode configs.
I've used env-cmd with the following setting for building.
TSCONFIG_BUILD=tsconfig.build.json
TSCONFIG_WATCH=tsconfig.watch.json