Replies: 1 comment 2 replies
-
You should be able to import it in your server code and this will be stored as a server asset. https://vitejs.dev/guide/assets.html#static-asset-handling
You may have to modify your vite config to get it to work with .mjml files |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a few
.mjml
templates that I use withnodemailer
andnodemailer-mjml
plugins. However they are not packaged into the final build and they are not available to the function that uses them.How do I prevent these files from getting stripped out of server build?
I tried putting them in
static
folder but then the files ended up in the client side folder, again unavailable to the server side function.I believe using some static files other than html, css and js is something fundamental. It's a unilateral decision to strip everything out without giving the developer an opt-out mechanism.
Beta Was this translation helpful? Give feedback.
All reactions