webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

[Internal] Don't overwrite tsconfig.json content if it already exists

Open Pavel910 opened this issue 3 years ago • 0 comments

This issue is related to our script scripts/generateTsConfigsInPackages which generates proper tsconfig .json files for all the workspaces. One little issue with that script is that it completely wipes out the content of the file, if it already exists. Some packages will have custom configs which might differ from the common template we use.

The solution is to check if the file already exists, and if it does, only overwrite the references and paths, and leave the rest in place. If the file doesn't exist, use our common template.

Pavel910 avatar May 08 '22 14:05 Pavel910