IntelliJ IDEA mistakenly requires .js suffix on ES6 module import.

I am using the latest version of IntelliJ IDEA. I have enabled Javascript ES6 support. 

The IDE mistakenly forces me to include the .js suffix for all module imports. Is there some setting that I can change to fix this. Note I am using webpack and the IDE is telling me that webpack.config is providing module resolution rules. Is this the issue? If so how do I resolve it?



Do you have Use file extension in module name enabled in Settings | Editor | Code Style | JavaScript?


Can you provide the detailed problem description then?


Very strange. I now no longer get the error complaining about the missing suffix. Very weird. I did upgrade versions yesterday. Anyway. Thanks for the assist.



Should the problem occur again, please provide a screenshot of the error message


Ok, the problem is indeed back but only for a particular project. One project - a mid-size web app with maybe 2 dozen modules - this is not an issue. Suffix are not required. However for a smaller project - same IDE settings - it is always an issue.


Here is the project settings:


Here are the module imports

Here is the error

I just don't get it.




Hmm.. these are runtime errors shown in browser that don't seem to be related to IDEA.

Do you use browser's native support for ES6 modules (via <script type="module">)? Chrome requires specifying .js extension explicitly - see comments in


Ahhh. Right. It's a Chrome thing. Ok. Thanks a lot.



Please sign in to leave a comment.