vue3: how to add vuex files to vue-docgen-cli generate?

54 views Asked by At

I'm trying to add documentation for the store, I found an example (https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/examples/vuex) and want to adapt it to Vue3

docgen.config.js

module.exports = {
    ...
    renderRootJsx: path.join('docs', '.vitepress/styleguide.root.js')
}

styleguide.root.js

import { h } from 'vue'
import { useStore } from 'vuex'

export default previewComponent => {
    const store = useStore()
    return {
        store,
        render() {
            return h(previewComponent)
        }
    }
}

no result

0

There are 0 answers