2025 Update:
I was facing the same issue and tried everything mentioned in this thread and more, adding webpack.config.js in the Webstorm settings, jsconfig.json file to my project folder, invalidating cache and manually start reindexing by closing and opening Webstorm but nothing worked.
What worked for me was to initiate Repair IDE feature in Webstorm by going to:
File->Repair IDE
then initiating the repair steps on by one
Refresh Indexable Files->Rescan Project Indexes->Reopen Project->Invalidate Cache and Restart