Searching for index.js files

While using quick navigation/search It would be great if index.js files nested directly under a directory matching the query were considered matches.



While working on a project with the following following directory structure:


Currently a search for "actions" returns no matches. Instead it would be helpful if a search for "actions" would pull up actions/index.js as a match.


If this is possible already by tweaking something let me know.




Hi there,

If you are searching for a folder, then you have to specify this nuance with using `/` ... because "Navigate | File" searches for files and not folders (as name suggests)

So .. "act/in" or just "act/" might be enough (depends on how many folders starting with "act" you have in your project) to show you the files from such folders.


Hi Andriy,

Yes I'm aware but unfortunately when including the `/` and then pressing return the file navigator opens up and displays the directory (as it should) instead of just opening the index.js file in the editor. To open the index.js file you need to also start typing `index` after the `/`.

Thanks for the info though!



I would also be useful if import actions from './actions' would actually resolve index.js file if it exists. 


It would be great if something like Igor suggested existed. Even more so if you could customize the file name pattern. I personally tend to use build plugins that allow me to write only the directory name and the 'default' file is imported. 

Such as import actions from './actions' with the full path actually being './actions/actions.js'. It reduces unnecessary boiler plate code. 


>It would be great if something like Igor suggested existed.


Directory imports (like import actions from './actions') are correctly resolved, WebStorm jumps to appropriate code in index.js


I tried the latest IU 2017.1 EAP with TypeScript. index.ts imports are not being resolved.

Is there a related bug / feature for it?



No, it's not an issue I'm aware of. Please make sure you have the latest compatible NodeJS plugin installed. If it doesn't help, please provide a project plus steps to repeat


Please sign in to leave a comment.