How to import , register and use vue SFC (Single-File Component) from node_modules ?
ezzle opened this issue · 2 comments
ezzle commented
How to import vue SFC from node_modules ? . I need to import vue component from Vitepress node_modules/vitepress/dist/client/theme-default/components. How to register and use them in .md
MichaelCurrin commented
This question is offtopic. This repo has nothing todo with Vitepress. And Docsify uses index.html and loading JS file - no node_modules
Try asking on Vue or Vitepress help please.
MichaelCurrin commented
I feel like the Vue docs cover this.
Took the first search result https://vuejs.org/guide/scaling-up/sfc.html
import MyComponent from './MyComponent.vue' // replace with reference to external library
export default {
components: {
MyComponent
}
}