Skip to content

Commit

Permalink
#3780: Do not show the warning for "null" and missing interpreters
Browse files Browse the repository at this point in the history
  • Loading branch information
BR0kEN- committed Aug 24, 2018
1 parent a94df5e commit 16fd089
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/core/src/server/serverRequire.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);

Expand Down

0 comments on commit 16fd089

Please sign in to comment.