Render a vue template completely on a server route (and get the string from it)
Hi there. I am using a backend api route to send an email. I have some JS data that I want to render as a HTML template string, which I can send as the email body.
I was thinking to use vue as a templating engine, since the whole nuxt ecosystem is vue.
So I tried:
But this gives me a error:
Do you have any idea on how to archive this?
3 Replies
What works though is
I am getting
it's just without syntax highlighting and I would like to exclude it into another file.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
@adetayo Thanks for your answer
1. yeah that would work, but then I would also loose syntax highlighting.
2. I had the same issue, you have to do
in your
nuxt.config.app
and
in your server route