From 16fd0890049066b73554db95611ae40010e978c0 Mon Sep 17 00:00:00 2001 From: Sergii Bondarenko Date: Thu, 23 Aug 2018 16:45:36 +0400 Subject: [PATCH] #3780: Do not show the warning for "null" and missing interpreters --- lib/core/src/server/serverRequire.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/core/src/server/serverRequire.js b/lib/core/src/server/serverRequire.js index 9deb4cba90e9..aab3dc8a4d5d 100644 --- a/lib/core/src/server/serverRequire.js +++ b/lib/core/src/server/serverRequire.js @@ -78,13 +78,10 @@ export default function serverRequire(filePath) { const { path: candidatePath, ext: candidateExt } = existingCandidate; - if (candidateExt === '.js') { - return interopRequireDefault(candidatePath); - } - const moduleDescriptor = interpret.extensions[candidateExt]; - if (moduleDescriptor !== null && registerCompiler(moduleDescriptor) === 0) { + // The "moduleDescriptor" either "undefined" or "null". The warning isn't needed in these cases. + if (moduleDescriptor && registerCompiler(moduleDescriptor) === 0) { logger.warn(`=> File ${candidatePath} is detected`); logger.warn(` but impossible to import loader for ${candidateExt}`);