-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Good First IssueGood for newcomersGood for newcomers
Description
Hello,
Example: this (transpiled) code loads the index.js file
import { some_function } from '../siblingdir'; // there is an index.js in the "siblingdir"
If i try to use this in an es6 fashion I will get ERR_UNSUPPORTED_DIR_IMPORT
Because it is not possible in the esm standard to do directory imports, it has to be fully specified import { some_function } from '../siblingdir/index.js
I wonder if there is an options where it detects:
- if it is a directory, add an /index.js suffix
- if it is a normal file add the explicit extension '.js'
Cheers,
nzacca and alicewriteswrongs
Metadata
Metadata
Assignees
Labels
Good First IssueGood for newcomersGood for newcomers