MJML includes not working
1stevengrant opened this issue · comments
Finding that <mj-include path="./components/header" />
as per https://mjml.io/documentation/#mj-include don't seem to work.
The Laravel Mix task tries to build the individual MJML components into their own Blade files (which makes sense).
Hi, think you have to add absolute path not relative (based app base_path).
<mj-include path="resources/mail/components/header" />
@1stevengrant Can you show me the mix config file you are using to call the plugin? It should only pickup the files you explicitly specify in your config, the actual rendering is handled by mjml itself.
@vanderb Thanks for the tip! I just found that mjml supports a filePath
option, would it make sense to make all paths relative to the current file being rendered?
I'm having this issue as well. @stidges this should solve it if we can specify a base path to use. Thanks!
I'll see if I can get something going this week! I found the issue inside the plugin, fixing them would introduce some breaking changes though.