Sharing Typescript project settings via git 关注
first of all a Happy New Year!
I'm wondering which files of my .idea folder should go into version control in a multi-module setup with Typescript.
We see a lot of changes to .idea/libraries/tsconfig_roots.xml files. Are those supposed to be shared or are these machine dependent?
yes, there is a library 'tsconfig$roots' in the JS libraries configured as a project library.
Might be smth auto-generated (didn't see it created though). I can tell for sure that it doesn't have to be version controlled. Not even sure if it's needed at all... Try deleting it - are there any problems?
I tried to remove the libs but apparently they are auto-generated. When I delete them from git, I still see references to these logical libraries in the iml file of my modules.
`<orderEntry type="library" name="tsconfig$roots" level="project" />`
Also there is a reference in `jsLibraryMappings.xml`. When I reopen the project with the tsconfig_roots.xml deleted on the cmd line, it is regenerated automatically, though. Long story short: I wonder if it is really ok to have seemingly inconsistent configuration in git.
I did this but after I reopend the project, it was automatically added again.
just checked - this library is indeed auto-generated if path mappings in tsconfig.json include `external` paths (located outside of the project). As the library is automatically created from your tsconfig.json, version controlling it doesn't make much sense... I don't think that adding .idea/libraries/tsconfig_roots.xml to .gitignore would make your configuration inconsistent
Perfect. Thank you for confirming the behavior as expected and correct! I'll remove all the stuff and let you know if it works for our setup. We do indeed have externally shared tsconfigs.