public moduleIdToPaths()

in src/core/configuration.ts [455:502]


		public moduleIdToPaths(moduleId: string): string[] {

			if (this._env.isNode) {
				const isNodeModule = (
					(this.nodeModulesMap[moduleId] === true)
					|| (this.options.amdModulesPattern instanceof RegExp && !this.options.amdModulesPattern.test(moduleId))
				);

				if (isNodeModule) {
					// This is a node module...
					if (this.isBuild()) {
						// ...and we are at build time, drop it
						return ['empty:'];
					} else {
						// ...and at runtime we create a `shortcut`-path
						return ['node|' + moduleId];
					}
				}
			}

			let result = moduleId;

			let results: string[];
			if (!Utilities.endsWith(result, '.js') && !Utilities.isAbsolutePath(result)) {
				results = this._applyPaths(result);

				for (let i = 0, len = results.length; i < len; i++) {
					if (this.isBuild() && results[i] === 'empty:') {
						continue;
					}

					if (!Utilities.isAbsolutePath(results[i])) {
						results[i] = this.options.baseUrl + results[i];
					}

					if (!Utilities.endsWith(results[i], '.js') && !Utilities.containsQueryString(results[i])) {
						results[i] = results[i] + '.js';
					}
				}
			} else {
				if (!Utilities.endsWith(result, '.js') && !Utilities.containsQueryString(result)) {
					result = result + '.js';
				}
				results = [result];
			}

			return this._addUrlArgsIfNecessaryToUrls(results);
		}