This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 270610

Summary: Go To Imported File - resolve module path to folder/index.js
Product: javascript Reporter: xMihai
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description xMihai 2017-05-10 18:52:06 UTC
This enhancement refers to the Go To Imported File action (Ctrl+click on file name in import statement)

Lets assume this statement:
import {Stuff} from '../stuff'

If the path does not resolve to a file (../stuff.js) then the editor should look for a '../stuff/index.js' file.

As far as I understand, this is not specified in ES6. But node.js, babel, webpack and others will correctly resolve the path. This convention is increasingly popular and the enhancement would be of value for developers.