I'm trying to use Javascript ES6 import syntax with WebPack configured to use client
and node_modules
as root paths for resolving imports.
IntelliJ Idea discovers modules from "node_modules" directory, but it cannot resolve paths from "client" directory.
For example:
When im using:
import ImmutableStore from 'alt/utils/ImmutableUtil';
- IntelliJ finds proper paths, because alt
module is on node_modules
directory
import CustomiserActions from 'js/actions/Customiser.actions.js';
- It doesn't work, because js
module is in client
directory.
I've tried many options in module settings/project settings/marking directory as source roots/adding external libraries but nothing seems to work.
IntelliJ Idea version: 14.1.5
I know this is old thread. Just for reference, mark the parent directory(in this case 'js') as 'Resource Root,' then Intellisense will work on 2016 version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With