React with JetBrains WebStorm auto import with absolute path instead of relative React with JetBrains WebStorm auto import with absolute path instead of relative reactjs reactjs

React with JetBrains WebStorm auto import with absolute path instead of relative


Found it (WebStorm 2017.2), after marking your source directory (ex. /src) as the source root (right click it to find that), you can then check this box:

enter image description here


For anyone using Typescript. Check the option Use paths relative to tsconfig.json in Editor > Code Style > Typescript