chore(ui): display error if plugin loading fail in debug mode

This commit is contained in:
Guillaume Chau
2018-06-13 19:46:39 +02:00
parent 50027c6244
commit 00d37d8360

View File

@@ -138,7 +138,11 @@ function runPluginApi (id, context, fileName = 'ui') {
let module
try {
module = loadModule(`${id}/${fileName}`, cwd.get(), true)
} catch (e) {}
} catch (e) {
if (process.env.VUE_CLI_DEBUG) {
console.error(e)
}
}
if (module) {
pluginApi.pluginId = id
module(pluginApi)