Steps to Reproduce:
Code
import { member } from './myModule'
Directory Structure: ./myModule/index.js
memberimport { member } from './myModule/index'

I'm not sure if this is a vscode or a TypeScript specific issue (my understanding is that the TypeScript engine is powering all JS intellisense). Perhaps it can be resolved using some settings in jsconfig.json? Apologize if it's configuration based, but I couldn't find anything in the docs.
The docs on TypeScript's module resolution seem to suggest that this should work without having to explicitly mention the index file in the path: https://www.typescriptlang.org/docs/handbook/module-resolution.html
Does your project have a jsconfig.json? Can you make sure it contains the setting:
{
"compilerOptions": {
"module": "commonjs"
}
}
That worked! Does it matter that I'm using ES6 import and export syntax?
Not in this case since you are working with JavaScript instead of TypeScript. In a jsconfig, the module option only changes how paths are resolved
Most helpful comment
Does your project have a
jsconfig.json? Can you make sure it contains the setting: