Autocomplete doesn't add a file extention

Hello!

When I try to add some js-file import, WebStorm doesn't add the ".js" or ".jsx" extention at the end of string.

Somewhen I found a solution on StackOverflow, smth like to use "Find Action" menu and change some checkbox. But now I can't find this solution and can't configure this parameter.

Does some way exist for this? Thanks!

11 comments
Comment actions Permalink

To complete imported filename with extension, set registry key commonjs.complete.required.filename.with.extension to true :

  • Open "Help | Find Action..." dialog
  • Type Registry, find Registry item in dropdown list and press Enter
  • Find commonjs.complete.required.filename.with.extension there, tick the checkbox
0
Comment actions Permalink

Thank you very much! 

0
Comment actions Permalink

Добрый день!

Пытаюсь повторить вашу инструкцию - не находит такой раздел в настройках


WebStorm 2017.2.5
Build #WS-172.4343.25, built on October 20, 2017
Subscription is active until May 11, 2018
JRE: 1.8.0_152-release-915-b12 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows Server 2008 R2 6.1

0
Comment actions Permalink

Здравствуйте!

 

он там определенно есть:

0
Comment actions Permalink

Подскажите пожалуйста, как вы открыли диалог Registry

0
Comment actions Permalink

Из меню Help > Find Action (Ctrl+Shift+A), там ввести сначала Registry..., а потом уже, в открывшемся окне, найти чекбокс

0
Comment actions Permalink

Как написано выше:

 

  • Open "Help | Find Action..." dialog
  • Type Registry, find Registry item in dropdown list and press Enter

Вы в "Help | Find Action..." ищете непосредственно ключ, а надо искать Registry и уже в нем искать

 

0
Comment actions Permalink

Спасибо - пропустил пункт с поиском реестра )

0
Comment actions Permalink

Hello.

Is there any way to fix this in IntelliJ IDEA 2020.1.1 (Ultimate Edition)? There is no such registry setting.

Very annoying when you have to manually fix every single import or webpack build will error and stop compiling.

0
Comment actions Permalink

Please try enabling Use file extension in module name in Settings | Editor | Code Style | JavaScript | Imports

2

Please sign in to leave a comment.