Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md 文件引入vue失败 #667

Closed
3 tasks done
meikang123 opened this issue May 27, 2022 · 4 comments
Closed
3 tasks done

md 文件引入vue失败 #667

meikang123 opened this issue May 27, 2022 · 4 comments

Comments

@meikang123
Copy link

Describe the bug

image
image

Reproduction

引入外部资源

Expected behavior

起作用

System Info

...

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@meikang123 meikang123 added the bug: pending triage Maybe a bug, waiting for confirmation label May 27, 2022
@kiaking kiaking removed the bug: pending triage Maybe a bug, waiting for confirmation label May 29, 2022
@kiaking
Copy link
Member

kiaking commented May 29, 2022

You can't use lang="ts" inside markdown file. Remove it and it should work fine 👍

@kiaking kiaking closed this as completed May 29, 2022
@meikang123
Copy link
Author

You can't use lang="ts" inside markdown file. Remove it and it should work fine 👍

关闭了也是不行的 我都有尝试了

@meikang123
Copy link
Author

image

@brc-dd
Copy link
Member

brc-dd commented Jun 1, 2022

Are you trying to add Vue code inside a code block and getting that error?

If so, there is probably something wrong with your :::demo directive. For me, it is working fine:

# Test

```vue
<template>
  <div>Hey There</div>
</template>

<script setup>
import Foo from "./Foo.vue";
</script>
```

Output:

image

If you still think it is an issue with VitePress, please provide a minimal reproducible example.

Also that error seems to be with a different file not the one you've shown in image. The error log shows different code and different line numbers.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants