Skip to content

How can I know if a plugin is enabled in another plugin? #193

Answered by meteorlxy
Mister-Hope asked this question in Q&A
Discussion options

You must be logged in to vote

You can use following snippet to detect if a plugin has already been used:

https://github.com/vuepress/vuepress-next/blob/5e96641b8d2dd947372222e0af2ea47729afbada/packages/%40vuepress/core/src/app/appUse.ts#L17-L32


TBH, supporting nested plugins does have this kind of tradeoff.

@shigma made vuepress-mergable in v1 to solve this problem (I think it wouldn't work in v2 now 😓 ).

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@meteorlxy
Comment options

@Mister-Hope
Comment options

Mister-Hope Jun 9, 2021
Collaborator Author

@Mister-Hope
Comment options

Mister-Hope Jun 9, 2021
Collaborator Author

@meteorlxy
Comment options

@Mister-Hope
Comment options

Mister-Hope Jun 9, 2021
Collaborator Author

Answer selected by Mister-Hope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants