Skip to content

Using VuePress inside existing Vue app #102

Answered by meteorlxy
gvnt asked this question in Q&A
Discussion options

You must be logged in to vote

I would say NO for the complexity.

However, I think it's technically possible:

  1. Use VuePress Node API to app.init() and app.prepare(), then skip the built-in dev / build, and use your own build process. See @vuepress/cli package for example usage.
  2. Configure your bundler correctly, especially the alias and define hook that provided by Plugin API. See @vuepress/bundler-webpack or @vuepress/bundler-vite package for details.
  3. Then you need to load the @vuepress/client pacakge in your Vue app:
  • If you want to use VuePress as an individual Vue app, consider using the createVueApp method that provided by @vuepress/client/src/app.ts to create a new Vue app instance and a new Vue Router instance. …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gvnt
Comment options

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