We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c307c9 commit 74887c5Copy full SHA for 74887c5
packages/@vuepress/core/lib/node/plugin-api/util.js
@@ -43,6 +43,14 @@ exports.flattenPlugin = function (
43
// 'Object.create' here is to give each plugin a separate context,
44
// but also own the inheritance context.
45
config = config(pluginOptions, Object.create(pluginContext), self)
46
+ const { valid, warnMsg } = assertTypes(config, [Object])
47
+ if (!valid) {
48
+ logger.warn(
49
+ `[${chalk.gray(shortcut)}] `
50
+ + `Invalid value for plugin: ${warnMsg}`
51
+ )
52
+ config = {}
53
+ }
54
}
55
56
// respect name in local plugin config
0 commit comments