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

failed to import .md files #17428

Closed
7 tasks done
AhmedHamdy-B opened this issue Jun 9, 2024 · 2 comments
Closed
7 tasks done

failed to import .md files #17428

AhmedHamdy-B opened this issue Jun 9, 2024 · 2 comments

Comments

@AhmedHamdy-B
Copy link

AhmedHamdy-B commented Jun 9, 2024

Describe the bug

I have a vue3 quasar app, that was using webpack and I migrated to vite, and fixed all of the issues except one thing, which is importing .md files, whenever I try to import an .md file it shows this error:
image

Reproduction

https://stackblitz.com/edit/vitejs-vite-g4uunx?file=index.html&terminal=dev

Steps to reproduce

No response

System Info

chrome
quasar2
vue3

Used Package Manager

npm

Logs

[vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .md file format.
Plugin: vite:import-analysis
File: E:/Work/compliance-fe-main-v2-vite/changelog.md

Validations

Copy link

stackblitz bot commented Jun 9, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@bluwy
Copy link
Member

bluwy commented Jun 10, 2024

As shown in the error message, you need a Vite plugin that can transform .md files to JS modules so it can be imported. I'm not sure if it's a misconfiguration, but the repro doesn't have a Vite plugin nor a .md file.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants