log the first error that happens when loading a plugin fails
This commit is contained in:
parent
066cefe807
commit
5afb6e3064
|
|
@ -35,8 +35,13 @@ module.exports = {
|
|||
try {
|
||||
return require(path.join(pluginsDir, name));
|
||||
} catch (err) {
|
||||
// if it fails here, let it fail hard
|
||||
return require(path.resolve(process.cwd(), name));
|
||||
try {
|
||||
return require(path.resolve(process.cwd(), name));
|
||||
} catch(error) {
|
||||
console.error('Couldn\'t load plugin %s: %s', name, err); // eslint-disable-line no-console
|
||||
// if it fails here, let it fail hard
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue