Replies: 1 comment
-
First, please open a discussion instead of an issue when asking a question. If you want to make such a plugin, you should dive into our source code to understand how we transform md to vue. Here are some of relevant code: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I may simply lack information here, since it seems to be an execution order problem but at least it is not obvious from the documentation. ;)
I am writing a markdown plugin that generates it's own
<script setup>
block which I intend to be treated as if the author itself would have created it.However when rendered via the markdown plugin, the site crashes with a vue error, telling me that: "
[plugin:vite:vue] Tags with side effect (<script> and <style>) are ignored in client component templates.
"This leads me to believe, that markdown rendering happens after the page has been converted to a vue SFC. Is this assumption correct?
Is there a different way to render VUE specific content in markdown plugins or a flag that I overlooked that pulls the Markdown plugin before the Vue SFC compilation? -- Currently the plugin is configured in the
extendsMarkdown
section.Thx for your help.
Kind redards,
Josh
Reproduction
https://stackblitz.com/edit/vuepress-xsmfxy?file=docs/.vuepress/config.ts
Used Package Manager
npm
System Info
// irrelevant ;)
Beta Was this translation helpful? Give feedback.
All reactions