Closed fredrivett closed 7 years ago
Hey Ramiro, thanks for the reply as I know this is out of scope of issues.
Yeah you may well be right. I'm new to MJML and my first thought was to use webpack because I'm already using it, but it might not be needed. I assumed mjml-loader
was primarily for compiling .mjml
templates into email ready .html
code but may have misunderstood there.
Appreciate you taking the time to respond here 🙌
I'm new to webpack and have spent about 3-4 hours trying to work out how to take an
.mjml
file, process it withmjml-loader
and output the contents as a new file into a directory.I've played around with file-loader, raw-loader and extract-text-webpack-plugin but none do what I'm after.
I manage to console log the output nicely, but I want to output the file to save as a new file, not see it in my console.
The closest I've got is from this setup:
Template:
and
app.js
:Which outputs this as a new file:
I'm really not sure what I'm doing wrong here or how this should setup to work. This isn't really an issue with this repo, but I've spent a long time scratching my head on this already and as it seems like the most common setup people will use this loader for, I thought I'd ask here in case it can be clarified either simply to me here or with an update to the README to stop others scratching their heads for so long too.
Appreciate any help you can offer.