We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5db5351 commit 742f581Copy full SHA for 742f581
packages/@vuepress/core/src/app/appUse.ts
@@ -1,4 +1,4 @@
1
-import { chalk, debug } from '@vuepress/utils'
+import { chalk, debug, warn } from '@vuepress/utils'
2
import type { App, Plugin, PluginOptions } from '../types'
3
import { normalizePlugin } from './normalizePlugin'
4
@@ -21,6 +21,13 @@ export const appUse = <T extends PluginOptions>(
21
)
22
if (duplicateIndex !== -1) {
23
app.pluginApi.plugins.splice(duplicateIndex, 1)
24
+
25
+ // show warning when duplicate plugins are detected
26
+ warn(
27
+ `plugin ${chalk.magenta(
28
+ plugin.name
29
+ )} has been used multiple times, only the last one will take effect`
30
+ )
31
}
32
33
0 commit comments