Improve handling of ESM default exports
The IoC container now treats ESM exports as first class citizens and handles them in the following ways
ESM default export
export default class Foo {}
ioc.make('Path/To/Foo/Module') // Foo instanceexport default class Foo {}
ioc.use('Path/To/Foo/Module') // Foo classexport default class Foo {}
ioc.useEsm('Path/To/Foo/Module') // { default: Foo }Also, the fakes are limited to work with default exports. Named exports cannot be faked using ioc.fake
- refactor: cleaning up handling of esm default exports 57bee2b