Do not use directory import when available doesn't work

Hi!

On my project we prefer index.js imports:

import {store} from '/src/redux/index.js';

over directory imports:

import {store} from '/src/redux/';

I want webstorm autoimport feature to use the first type of import.

I tried unchecking "Use directory import when index.js is available (node-style module resolution)" both in "Editor->Code Style -> JavaScript -> Imports" and "Editor->Code Style -> TypeScript -> Imports", reloaded Webstorm but it still adds import from directory, when I use autoimport :(

2 comments
Comment actions Permalink

This option only works if no path mappings (aliases) are there; please follow https://youtrack.jetbrains.com/issue/WEB-43591 for updates

1
Comment actions Permalink

Thank you for explanation :)

0

Please sign in to leave a comment.