Reputation: 405
In my JS-Project, I have a package.json in every directory to import for example like this:
import CustomTextComponent from "@components/TextComponent"
instead of
import CustomTextComponent from "../../../components/TextComponent"
Now, PhpStorm marks every import red but everything runs fine. Where can I set another import path that PhpStorm not only checks node_modules?
Upvotes: 1
Views: 196
Reputation: 93778
are you using React native hack for specifying absolute paths? It had never been supported. If you miss this feature, please follow WEB-23221 for updates. You can try creating a dummy webpack config like it's suggested in https://youtrack.jetbrains.com/issue/WEB-23221#focus=streamItem-27-2719626.0-0 and specifying a path to it in Settings | Languages & Frameworks | JavaScript | Webpack as a workaround
Upvotes: 1