superbigco / craft-mjml

Render Twig emails with MJML.
https://superbig.co
MIT License
25 stars 5 forks source link

Always render template if in LivePreview mode #11

Closed luke-nehemedia closed 4 years ago

luke-nehemedia commented 4 years ago

In LivePreview mode, the template is not rendered again with every change, since there's already an output file existing.

This change makes sure that the template is rendered anew every time if in LivePreview.

Maybe there is a better or cleaner solution I am not aware of. But for now it fixes the problem.

sjelfull commented 4 years ago

Ah, interesting implication there. I will look into it some more, I've seen other people mention recently that there is some considerations to be made when supporting live preview. Thanks!

luke-nehemedia commented 4 years ago

I use it as backbone for a newsletter and contact form system. Especially for the newsletter, live preview is quite important.

I'm looking forward to see whether this can be optimized even more. Thanks for merging.