How to configure Vue to process files with other extensions like md(markdown) as static assets? #11277
Unanswered
CoderJo-Pro
asked this question in
Help/Questions
Replies: 1 comment 3 replies
-
Check the document of vite, or ask for help in vite's discussion. https://vitejs.dev/guide/assets.html#importing-asset-as-string The simplest explanation is: import README from './readme.md?url' // README = '/xx/xx/readme.md' import README from './readme.md?raw' // README = '# Hi \n\n ## It's me, the document content ....' |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm seeking guidance on using the
fetch
method with an alias URL like"@/assets/example.md"
to download markdown files and reference them. After researching online, it appears that editing thevue.config.js
file is necessary. However, navigating the documentation was overwhelming, and I felt lost, therefore I've reached out for assistance.The two problems I face are:
fetch
method be processed to the corresponding production URL in Vue?Beta Was this translation helpful? Give feedback.
All reactions