React component files not indexing or highlighting properly.
I cannot figure out how to get PhpStorm to correctly index and syntax highlight my React component files. The JSX markup is highlighting properly, but all JavaScript code remains colorless.
I have them in a directory called 'src' and it is not in the same path location as my webpack configuration. Therefore it should not be ignored by default. There are small 'x' icons in the sidebar for these JS files denoting they are being disregarded in some way or another.
Can anyone enlighten me on how to get these to be properly highlighted?


Please sign in to leave a comment.
Please check your
.idea/workspace.xml- do you have these.jsfiles listed in<component name="TypeScriptGeneratedFilesManager">section there, like:If it's not there, please try invalidating caches (File | Invalidate caches, Invalidate and restart) - does the issue persist?
Elena, thank you for your reply.
Actually, I figured it out only moments ago. My workspace config was fine, but under:
Preferences > Directories
*.js was in the "Exclude files" input field (at the bottom). I don't understand how this happened, because I certainly didn't insert in manually. But after I removed *.js from the "Exclude files" field, indexing and highlighting now work as they should.