Next.js Discord

Discord Forum

Import any file as text?

Unanswered
Siamese posted this in #help-forum
Open in Discord
SiameseOP
I want the ability to have large portions of text in their own file format (for example, css code blocks in an actual css file), which I can then import as text and pass to a component (for example showing inside an embedded editor). In vite, I can do this with ?raw to import the file as text content. Is this possible in nextjs?

0 Replies