Mark folder as Resource Root is not persistent
I have React Native project in Intellij IDEA Ultimate. I've found that in order for IDEA to track imports properly I have to mark a parent directory as Resource Root. This works just fine.
However the code is managed in git and if I change branches the parent directory is no longer marked as Resource Root and I have to manually re-mark it each time. I've checked and .idea and .iml files are in my .gitignore. Switching branches is not pulling down a new project file and thus overwriting my Resource Root marking.
Is there a way I can mark a directory as Resource Root and have it be persistent? Thanks.
Please sign in to leave a comment.
Did you try to diff the project files to check why it happens? This information is stored in the .iml file. Does it remain the same?
In case the project is imported from Gradle/Maven, source roots information will be regenerated.