resolve()

in src/Container.js [69:98]


	resolve(key) {
		return new Promise((resolve, reject) => {
			const registration = this._registrations[key];

			if (!registration || !registration.operator) {
				reject(new Error('Cannot resolve registration.'));
				return null;
			}

			registration
				.operator()
				.then((o) => {
					// Handle any esModule's with default exports
					// This helps developers write cleaner container code otherwise
					// they will need to wrap `import()`'s in Promises that return the default..
					// https://github.com/webpack/webpack.js.org/pull/213
					let component = o;
					if (o.__esModule && o.default) {
						component = o.default;
					}

					resolve({
						component,
						meta: registration.meta,
					});
					return component;
				})
				.catch(reject);
		});
	}