Skip to content

How can I import files as text #4857

Answered by bluwy
LokiMidgard asked this question in Q&A
Discussion options

You must be logged in to vote

Use the ?raw suffix: import nota from './../data/nota.xml?raw'; https://vitejs.dev/guide/assets.html#importing-asset-as-string

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LokiMidgard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants