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 - Go To Imported File - resolve module path to folder/index.js
Summary: Go To Imported File - resolve module path to folder/index.js
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2017-05-10 18:52 UTC by xMihai
Modified: 2017-05-10 18:52 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.