Lines Matching refs:isMain
174 return Module._load(id, module, /* isMain */ false);
425 * @param {boolean} isMain Whether the file is the main entry point of the app
428 function tryPackage(requestPath, exts, isMain, originalPath) {
432 return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain);
436 let actual = tryFile(filename, isMain) ||
437 tryExtensions(filename, exts, isMain) ||
438 tryExtensions(path.resolve(filename, 'index'), exts, isMain);
440 actual = tryExtensions(path.resolve(requestPath, 'index'), exts, isMain);
466 * Check if the file exists and is not a directory if using `--preserve-symlinks` and `isMain` is false, keep symlinks
469 * @param {boolean} isMain Whether the file is the main module.
471 function tryFile(requestPath, isMain) {
474 if (getOptionValue('--preserve-symlinks') && !isMain) {
484 * @param {boolean} isMain Whether the module is the main module
486 function tryExtensions(basePath, exts, isMain) {
488 const filename = tryFile(basePath + exts[i], isMain);
606 * @param {boolean} isMain Whether the request is the main app entry point
609 Module._findPath = function(request, paths, isMain) {
676 if (!isMain) {
702 filename = tryExtensions(basePath, exts, isMain);
711 filename = tryPackage(basePath, exts, isMain, request);
944 * @param {boolean} isMain Whether the module is the main entry point
946 Module._load = function(request, parent, isMain) {
981 const filename = Module._resolveFilename(request, parent, isMain);
1004 if (isMain) {
1049 * @param {boolean} isMain Whether the module is the main entry point
1054 Module._resolveFilename = function(request, parent, isMain, options) {
1126 const filename = Module._findPath(request, paths, isMain);
1231 return Module._load(id, this, /* isMain */ false);