How to make IntelliJ IDEA resolve webpack requires out of node_modules directory? How to make IntelliJ IDEA resolve webpack requires out of node_modules directory? reactjs reactjs

How to make IntelliJ IDEA resolve webpack requires out of node_modules directory?


I think this should work (or so it did in my case anyway).

In IntelliJ:

  1. Open the project
  2. File > Project Structure
  3. On the left hand side, select Modules
  4. From your directory structure, select the folders where your sources are (util and src) and mark them as Resources
  5. Click Apply

You should have code completion and documentation available now.