tag:github.com,2008:https://github.com/stidges/laravel-mix-mjml/releasesRelease notes from laravel-mix-mjml2022-02-18T13:13:34Ztag:github.com,2008:Repository/142593621/v4.0.12022-02-18T14:31:54Zv4.0.1<p>Improve stability by catching any errors thrown during MJML processing and reporting them as webpack build errors</p>stidgestag:github.com,2008:Repository/142593621/v4.0.02022-01-08T13:15:11Zv4.0.0<ul>
<li>Fix output path not working correctly on windows (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="814322427" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/8" data-hovercard-type="issue" data-hovercard-url="/stidges/laravel-mix-mjml/issues/8/hovercard" href="https://github.com/stidges/laravel-mix-mjml/issues/8">#8</a>) - thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Bouhnosaure/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Bouhnosaure">@Bouhnosaure</a> !</li>
<li>Add support for webpack watch mode - thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DougThwaites/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DougThwaites">@DougThwaites</a> !</li>
<li>Remove default <code>mjmlOptions</code> - fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="855344261" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/10" data-hovercard-type="issue" data-hovercard-url="/stidges/laravel-mix-mjml/issues/10/hovercard" href="https://github.com/stidges/laravel-mix-mjml/issues/10">#10</a></li>
</ul>
<h2>Breaking changes</h2>
<p>This version removes the default <code>{ beautify: true, minify: false }</code> options from the <code>mjmlOptions</code> setting, because these have been deprecated by MJML since v4. The removal of the <code>minify</code> option should not affect the output of your templates, but if you'd still like to beautify the output you can add <code>{ mjmlOptions: { beautify: true } }</code> to the settings in your <code>webpack.mix.js</code> file. Note this this will output a deprecation notice, we unfortunately cannot remove this.</p>stidgestag:github.com,2008:Repository/142593621/v3.0.02021-01-22T18:17:48Zv3.0.0<p>Upgrade to Laravel Mix 6 and Webpack 5</p>stidgestag:github.com,2008:Repository/142593621/v2.0.32020-02-13T08:05:53Zv2.0.3<p>Fixed a typo in the default value of the <code>output</code> parameter to follow Laravel's folder structure (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="564016513" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/6" data-hovercard-type="pull_request" data-hovercard-url="/stidges/laravel-mix-mjml/pull/6/hovercard" href="https://github.com/stidges/laravel-mix-mjml/pull/6">#6</a>). Thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/angelocala94/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/angelocala94">@angelocala94</a>!</p>stidgestag:github.com,2008:Repository/142593621/v2.0.22019-11-25T15:24:38Zv2.0.2<p>Fixed a bug with incorrect output paths on Windows (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528122327" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/5" data-hovercard-type="pull_request" data-hovercard-url="/stidges/laravel-mix-mjml/pull/5/hovercard" href="https://github.com/stidges/laravel-mix-mjml/pull/5">#5</a>). Thanks @danielmoeck!</p>stidgestag:github.com,2008:Repository/142593621/v2.0.12019-11-21T13:56:00Zv2.0.1<p>Fixed a bug where using a path as entry would produce an incorrect output path (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="526193575" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/4" data-hovercard-type="issue" data-hovercard-url="/stidges/laravel-mix-mjml/issues/4/hovercard" href="https://github.com/stidges/laravel-mix-mjml/issues/4">#4</a>)</p>stidgestag:github.com,2008:Repository/142593621/v2.0.02019-10-28T13:43:32Zv2.0.0<p>v2.0.0 introduces more flexibility for specifying the input paths and moves the MJML compiler options to a dedicated <code>mjmlOptions</code> entry in the <code>options</code> argument.</p>
<h1>New features and improvements</h1>
<ol>
<li><strong>Input path improvements</strong><br>
The input path now supports globs and specific input filenames. Previously it only supported a directory name and always performed a recursive glob to grab the files.</li>
<li><strong>Multiple entry support</strong><br>
The <code>.mjml()</code> plugin can now be called multiple times with different input paths, output paths and options.</li>
<li><strong>Better default <code>filePath</code> value</strong><br>
MJML uses a <code>filePath</code> option to resolve the paths used in <code>mj-include</code> directives. Previously this defaulted to the root directory of your project, but has now been updated to the input path to support relative file inclusion.</li>
</ol>
<h1>Breaking changes</h1>
<ol>
<li><strong>New <code>mjmlOptions</code> entry in <code>options</code> argument.</strong><br>
This MJML compiler options have been moved into a dedicated <code>mjmlOptions</code> entry.</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// before
mix.mjml('resources/mail', 'resources/views/mail', {
extension: '.html',
beautify: false,
minify: true,
});
// after
mix.mjml('resources/mail', 'resources/views/mail', {
extension: '.html',
mjmlOptions: {
beautify: false,
minify: true,
},
});"><pre><span class="pl-c">// before</span>
<span class="pl-s1">mix</span><span class="pl-kos">.</span><span class="pl-en">mjml</span><span class="pl-kos">(</span><span class="pl-s">'resources/mail'</span><span class="pl-kos">,</span> <span class="pl-s">'resources/views/mail'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">extension</span>: <span class="pl-s">'.html'</span><span class="pl-kos">,</span>
<span class="pl-c1">beautify</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">minify</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// after</span>
<span class="pl-s1">mix</span><span class="pl-kos">.</span><span class="pl-en">mjml</span><span class="pl-kos">(</span><span class="pl-s">'resources/mail'</span><span class="pl-kos">,</span> <span class="pl-s">'resources/views/mail'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
<span class="pl-c1">extension</span>: <span class="pl-s">'.html'</span><span class="pl-kos">,</span>
<span class="pl-c1">mjmlOptions</span>: <span class="pl-kos">{</span>
<span class="pl-c1">beautify</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span>
<span class="pl-c1">minify</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<ol start="2">
<li><strong>New default <code>filePath</code> value</strong><br>
In previous versions, using the <code>mj-include</code> directive required you to specify the full path to the partial to include. While this could be overridden through the <code>options</code> argument, the default for this has been improved to allow easier relative file inclusion. If you are overriding the <code>filePath</code> option no changes have to be made:</li>
</ol>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="<!-- before -->
<mj-include path="resources/mail/includes/include.mjml" />
<!-- after -->
<mj-include path="./includes/include.mjml" />"><pre><span class="pl-c"><!-- before --></span>
<span class="pl-kos"><</span><span class="pl-ent">mj-include</span> <span class="pl-c1">path</span>="<span class="pl-s">resources/mail/includes/include.mjml</span>" <span class="pl-kos">/></span>
<span class="pl-c"><!-- after --></span>
<span class="pl-kos"><</span><span class="pl-ent">mj-include</span> <span class="pl-c1">path</span>="<span class="pl-s">./includes/include.mjml</span>" <span class="pl-kos">/></span></pre></div>stidgestag:github.com,2008:Repository/142593621/v1.0.42018-09-03T10:34:32Zv1.0.4<p>Bump version</p>stidgestag:github.com,2008:Repository/142593621/v1.0.32018-09-03T10:29:36Zv1.0.3<p>Fix build not triggering on watch. Closes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="352508984" data-permission-text="Title is private" data-url="https://github.com/stidges/laravel-mix-mjml/issues/1" data-hovercard-type="issue" data-hovercard-url="/stidges/laravel-mix-mjml/issues/1/hovercard" href="https://github.com/stidges/laravel-mix-mjml/issues/1">#1</a></p>stidgestag:github.com,2008:Repository/142593621/v1.0.22018-07-27T16:41:44Zv1.0.2<p>v1.0.2</p>stidges