-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
"vitepress" work with "unplugin-vue-components" bug #4519
Comments
That repository is empty. Forgot to push? |
sorry, i have pushed now |
Update the includes to this: include: [/\.(vue|md)($|\?)/] |
I use this at pwa docs (https://github.com/vite-pwa/docs/blob/main/vite.config.ts#L36-L56): // allow auto load markdown and vue components under `./components/`
extensions: ['vue', 'md'],
// allow auto import and register components used in markdown
include: [/\.vue$/, /\.vue\?vue/, /\.md$/], |
good! it works! thank you so much! |
@userquin OP also had that. But import _sfc_main from "/Users/divyansh/vitepress-auto-import-bug/index.md?vue&type=script&setup=true&lang.ts"; |
Describe the bug
all auto import components in dev mode is ok.
all auto import components in build mode is ok, when there have no 'script' tag in md files
if md file have 'script' tag of one page. the page's auto import component will not resolve in build mode!!!!
Reproduction
it's an empty vitepress project.
Reproduction URL
Expected behavior
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: