Please also consider 3rd party support. #1168
-
In my opinion, it would be more useful to support 3rd party. // .vuepress/config.js |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey, plz check out the docs, I already told you that. This is an open source project, and I have duty to nothing. Though I welcome everyone to share ideas, open issues or make suggestions, but it doesn't mean we have "technology support" here. You should try to read the docs carefully and try to understand our reply. I have already told you that the code demo is a feature targeting runtime, which means we do not expect any actions in compile stage, and all code are running on the client side(browser), so you are not allowed to "use" or "communicate" with "vue" in vuepress. This is aligning with our "codepen" and "jsfiddle" button (because if you use the internal vue instance in vuepress, it probably won't work if you click the two button and try to run it at these 2 websites). This feature, in another word, is letting you to run a snippet directly at client side, and we are just addding additional support so that if you mark the snippet as "vue" or "react" component and write one, we will automatically mount and display that component for you. And I also told you that in your case, you should try to build your own component and place it directly in markdown files to use the "vue" instance in vuepress, or try Your request about "supporting to display and running code of vue instance global component" is out of the feature design scope and also nearly impossible to be supported. This is the last reply I give about the code demo request you made, you can still feel free to open discussion about other features, but please read the docs carefully, also, stop insisting something if I told you I won't support it, if you cannot think out the reason, just leave it. I have no duty for anything on an open source project, including explaining you why I refuse your request. You are wasting my time. |
Beta Was this translation helpful? Give feedback.
-
Here is a possible solution: ::: demo
```html
<div id="app" />
```
```js
window.Vue.use(window.xxx); // xxx is the global name of your package
const root = document.querySelector('#app');
(new window.Vue.component('yyy')()).$mount(root) // yyy is the component name you want to use.
```
```json
{
"jsLib": [
// vue cdn link and your package cdn link here
]
}
```
:::
And this is what I am talking about: Writing some code which can work on the client side. BTW: Your first and only "technology support" ends |
Beta Was this translation helpful? Give feedback.
Here is a possible solution:
And this is what I am talking about: Writing some code which can work on the client side.
BTW: Your first and only "technology support" ends