<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Laravel Mix 4 Released]]></title><description><![CDATA[<p dir="auto"><strong>Laravel Mix 4 Released</strong></p>
<p dir="auto">Last week Jeffrey Way shipped Laravel Mix v4, the next major version of the Laravel Mix. Mix 4 uses Webpack 4 and comes with other nice improvements. Here’s the high-level list of new features in Mix 4 from Release v4.0.0:</p>
<ul>
<li>
<p dir="auto">Faster compiles</p>
</li>
<li>
<p dir="auto">Faster npm installs.</p>
</li>
<li>
<p dir="auto">Upgraded to webpack 4</p>
</li>
<li>
<p dir="auto">Upgraded to vue-loader 15</p>
</li>
<li>
<p dir="auto">Upgraded to Babel 7</p>
</li>
<li>
<p dir="auto">Automatic vendor extraction. If you call mix.extract() with zero arguments, all vendor dependencies (* any package from node_modules/ that you pull in) will automatically be extracted. Nifty!</p>
</li>
<li>
<p dir="auto">CSS minification (via cssnano) options may be provided</p>
</li>
<li>
<p dir="auto">PostCSS plugins may be passed to mix.sass/less/stylus() on a per-call basis. This means you may provide * unique PostCSS plugins for each mix.sass() call, if desired.</p>
</li>
<li>
<p dir="auto">Switched JS optimizing/minification from Uglify to Terser.</p>
</li>
<li>
<p dir="auto">Switched from node-sass to Dart Sass. While this comes with a small increased compile-time cost, the benefit is faster and more reliable npm installs.</p>
</li>
<li>
<p dir="auto">Improved Babel config merging strategy. You may now override or tweak any default Babel plugins and presets provided through Mix by creating a .babelrc file in your project root.</p>
</li>
</ul>
<p dir="auto">Under the hood, Mix changes from node-sass to dart-sass. Support is “largely identical,” but you might notice some compile warnings when upgrading. You can manually change back by installing the node-sass package and configuration the implementation:</p>
<pre><code>mix.sass('resources/sass/app.sass', 'public/css', {
    implementation: require('node-sass')
});
</code></pre>
<p dir="auto">Along with the 4.0 release, Jeffrey <strong>updated the laravel/laravel repo to v4</strong>. I’d encourage you to read his PR notes to understand the need for a few extra NPM dependencies and the .default property added to the Vue &lt;example-component/&gt; that ships with Laravel out of the box:</p>
<pre><code>Vue.component('example-component', require('./components/ExampleComponent.vue').default);
</code></pre>
<p dir="auto">Specifically note that vue-loader v13 requires .default “…if you use the CommonJS-style require for importing ES modules.”</p>
<p dir="auto">Jeffrey’s explanation of the extra sass-related modules required in laravel/laravel was helpful to help me understand his reasoning for adding them</p>
<p dir="auto">It’s pretty cool that Mix v4 automatically installs required dependencies on the fly based on the configuration file calling mix.sass().</p>
<p dir="auto"><strong>Learn More</strong><br />
Make sure to check out the full v4 <strong><a href="https://github.com/JeffreyWay/laravel-mix/releases/tag/v4.0.0" target="_blank" rel="noopener noreferrer nofollow ugc">release notes</a></strong> to help you upgrade your existing Laravel projects to Mix v4. A huge thank you to Jeffrey for providing this excellent asset pipeline tool for Laravel (and other projects) to get going with all the frontend tools you love quickly!</p>
<p dir="auto">-Quoted from Laravel News-</p>
]]></description><link>https://lankadevelopers.lk/topic/39/laravel-mix-4-released</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 01:09:26 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/39.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Dec 2018 17:18:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Laravel Mix 4 Released on Wed, 19 Dec 2018 03:24:27 GMT]]></title><description><![CDATA[<p dir="auto">I &lt;3 Laravel, thanks for the sharing.</p>
]]></description><link>https://lankadevelopers.lk/post/234</link><guid isPermaLink="true">https://lankadevelopers.lk/post/234</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Wed, 19 Dec 2018 03:24:27 GMT</pubDate></item></channel></rss>