PR #11 introduced Recursive Imports, but do not properly require index.js with special behavior. Ideally when a directory with both index.js and sibling files is imported, the index.js file is set to the base alias and is then extend with properties that match the sibling file names.
import * as Items from './dir';
console.log(Items.Nested()); // Whatever is in './nested/index.js'
console.log(Items.Nested.B()); // Whatever is in './nested/b.js'
PR #11 introduced Recursive Imports, but do not properly require
index.js
with special behavior. Ideally when a directory with bothindex.js
and sibling files is imported, theindex.js
file is set to the base alias and is then extend with properties that match the sibling file names.For example:
The following should be possible: