Skip to content

Releases: laravel-mix/laravel-mix

v0.9.0

22 Mar 16:28
Compare
Choose a tag to compare

Additions

  • Added support for automatic image file size optimization. 115e8f1
  • Added support for automatic CSS purification (removal of unused CSS). 41642eb
mix.options({ purifyCss: true });
  • Added mix.copyDirectory() method. This will copy a full directory to a new location. a7699b5
mix.copyDirectory('node_modules/some/place', 'public/copy/to/here');
  • Per Babel's recommendation, we've switched the default Babel preset from babel-preset-es2015 over to babel-preset-env. 126bad0
  • You can now disable the default clearing of of the console, each time Webpack compiles. 6400bb0
mix.options({ clearConsole: false });
  • Bumped Webpack dependency to ~2.3.0. cc79fe9
  • Bumped sass-loader and resolve-url-loader dependencies. 1828c8b
  • Bumped vue-loader and vue-template-compiler dependencies. 105533b
  • Bumped friendly-errors-webpack-plugin. 05c5674

Potentially Breaking

  • We no longer add jQuery as a default for webpack's ProvidePlugin. 8200441 If your app requires this, you can manually add it back in, like so:
mix.autoload({
    jquery: ['$', 'window.jQuery', 'jQuery']
});

Learn more about autoloading here.

Fixes

  • For file versioning, we swapped the webpack-md5-hash plugin in favor of webpack-chunk-hash. 52807f8
  • Chunked files will now be placed in your main JS output folder. 735521f
  • We now use smarter merging for mix.webpackConfig(). d9fa390
  • To prevent file name collisions, vendor assets will now be moved to a dedicated vendor folder. 6f3b052
  • mix.minify() now honors any custom Uglify user options. 761f9ad

v0.8.2

22 Feb 21:35
Compare
Choose a tag to compare

Additions

  • Added mix.scripts() and mix.styles(), which are aliases for mix.combine(). 80f9b05
  • Bumped friendly-errors-webpack-plugin. c760204
  • Added a rule for cursor files. 5dc00a2
  • When determining a production environment, we now also check for webpack-cli's -p flag. 970ae63
  • Added lang="stylus" support for .vue component files. 7f5b725

Fixes

  • Our webpack.config.js image loader regex now checks for jpg and jpegs. 32050bd
  • We no longer force an array as the first argument to mix.combine(). This way, you can instead provide a string that includes a regular expression. 96fc209
  • Fixed/Improved deep merging of options, when calling mix.options(). fecd1c9
  • Fixed/Improved Vue CSS extraction support. a9702be

v0.8.0

15 Feb 18:53
Compare
Choose a tag to compare

Additions

  • Added Stylus support, via mix.stylus(src, output). The first time you run this method, it will install the necessary dependencies. a0f9cdd
  • Added the ability to disable CSS url() rewriting. This is a feature of Webpack's, not a bug. That said, if you don't want Webpack to touch your CSS url()'s, you can add...
mix.options({ processCssUrls: false });

...to your webpack.mix.js file. 58d6b5d

  • Added a mix.babel() method. This works identically to mix.combine(), except for the fact that it applies Babel compilation, once the files have been concatenated. This is useful for simple projects, where you only need to combine a few scripts...but still would like to use ES2015. 047ab9c
  • Added a mix.react() method. Its signature is identical to mix.js(), and enables the necessary Babel plugins to compile everything down properly. The first time you run this method, it will install the necessary dependencies. a79f64b
  • Bumped clean-css dependency. 39923ee
  • Added mix.setResourceRoot() method. d779fa4

Fixes

  • Downgraded Webpack's css-loader dependency to a release before a particular performance bug was introduced. This should improve compile times significantly. 433bbab
  • Removed window.jQuery from Webpack's ProvidePlugin default. This seemed to cause issues with some plugins that check if window.jQuery is defined. f83b54f
  • Fixed an issue that caused certain old versioned files to not be deleted properly. 3c8bb72

v0.7.4

09 Feb 20:40
Compare
Choose a tag to compare

Additions

  • Added native BrowserSync support.
mix.browserSync('my-site.dev');

// or

mix.browserSync({
    proxy: 'my-site.dev',
    files: ['path/to/files/to/watch/**/*.js'] // defaults to Laravel-specific watchers
    port: 3000
});
  • Added Webpack support for recognizing HTML files c2403e7
  • Added an opt-in option to extract styling declared in your .vue files. e38f1f1
mix.options({ extractVueStyles: true });

Fixes

  • Mix will no longer fail if the source file you pass to mix.combine() does not exist (yet). 036b76d

v0.7.0

07 Feb 18:16
Compare
Choose a tag to compare

Potentially Breaking

  • If mix.version() is applied, the output path for mix.combine(src, output) will now automatically be versioned. If your webpack.mix.js file includes both mix.combine() and mix.version(), ensure that, in your HTML, you're referencing the proper output path for your mix.combine() call.

Additions

  • When calling mix.copy(), you may now also pass an array of file paths as the first argument.
mix.copy([
   'path/to/one.txt',
   'path/to/two.txt'
], 'public/output');
  • If mix.version() is applied, the output paths for mix.combine() will now automatically be versioned. 7c7aec6 and 4c065f2
  • You may now optionally pass an array to mix.version(). This way, you can version files that aren't part of your core Webpack build. cb819a0
mix.version(['public/js/some-file.js']);

This call will create a versioned file within the same directory. some-file.b2362b9e77323a1293c84124b5d6a5de.js. As with other versioned files, you may reference the mix-manifest.json file to fetch the exact hashed path.

https://www.dropbox.com/s/ssnc2zbuli4jzlp/Screenshot%202017-02-07%2013.09.17.png?dl=0

  • Bumped extract-text-webpack-plugin version. 4aac7a6

Fixes

  • Ensure that sass-loader always has sourcemaps enabled. This is a requirement for extracting CSS. c87a567

v0.6.2

03 Feb 20:04
Compare
Choose a tag to compare

Additions

  • mix.combine() will now watch all provided source files for changes, and then automatically re-concatenate them quickly.
  • When running mix.combine(), we now append the output path to your mix-manifest.json file. This normally wouldn't happen, because concatenation isn't part of your normal Webpack bundle. But we're manually appending it to the file for convenience. 9098035

Fixes

  • Fixed an issue with mix.combine() that caused output paths that included nested directories that don't exist to fail. We now recursively create the directory structure if it doesn't exist yet. 8870ff1
  • Node 6 or higher is required d280667
  • The friendly-errors-webpack-plugin plugin specifically wants a quiet: true option for devServer 58c35dc
  • When running mix.minify(), we no longer operate directly on the provided file. That made no sense. Instead, we output a new file to the same directory, and suffix .min.. So app.js would minify to app.min.js.

v0.6.1

03 Feb 19:58
Compare
Choose a tag to compare

Additions

  • Our webpack.config.js now detects regular CSS files. 9fbf090
  • Added JSX support to the .js test regex. c2fb9a9
  • You may now pass node-sass and Less-specififc plugin options to both mix.sass() and mix.less(), as the third argument. c4553a9
  • During production builds, we now automatically drop any lingering console.logs eaab1fe

v0.6.0

31 Jan 03:09
Compare
Choose a tag to compare

Additions

  • You may now compile Sass and Less at the same time. Before, you could only do mix.sass() or mix.less(). You had to choose. Now you can use both, if your app requires it. b2808ca
  • You may now call mix.extract() multiple times. Should you want to take advantage of HTTP2, this could be useful to split your vendor chunk into multiple, smaller files. bd4ddb2
  • As part of the new mix.extract() enhancements, you can also specify a new second argument, which will determine the output path - similar to mix.js().
mix.js('src', 'dest')
   .extract(['vue', 'jquery'], 'public/js/vendor-libs.js')
   .extract(['other', 'libs', 'to', 'extract'], 'public/js/will-go-here.js');

Fixes

  • When Webpack encounters an image, it'll now export it to /images, rather than your base public path. Any references to the file path will of course be updated automatically. e011d38
  • We no longer generate source maps for production environments. They're unnecessary. 71f4c7e
  • Calling mix.extract() before mix.js() no longer triggers an error. (But for readability, I'd still recommend calling it after.) 89af7a6
  • When calling mix.combine(), we now verify that every source file provided does, in fact, exist. bd1d69c
  • Ensured that Less compilation does include source maps, where necessary. 0d70dc9
  • Fixed a bug that caused multiple mix.sass() calls with the same base directory and file name to generate only one file, rather than two. 9d9c52f

v0.5.9

27 Jan 06:27
Compare
Choose a tag to compare

Additions

  • You are no longer required to call mix.js() at least once. If you don't, we'll setup a temporary entry-point for you (since Webpack requires it), and then delete it once Webpack finishes its build. cbe95bf
  • You can now hook into each time Webpack completes its build process, by calling mix.then()). 96c0ff3

Fixes

  • Fixed a bug that caused source files in different directories, but with the same name, to not compile properly. be433ff
  • Removed unused mix.setCachePath() method from API. d3843ad

v0.5.7

26 Jan 16:24
Compare
Choose a tag to compare

Additions

  • mix.copy() now accepts a third argument, which can be used to disable flattening for your output files. If you need to maintain your directory structure, do mix.copy('from', 'to', false); 52a0ffa
  • When compiling Sass, we now default to a precision level of 8. 102b71a

Fixes

  • When calling mix.js() multiple times, you may now specify unique output paths. Before, Mix would use the same JS base directory for all mix.js() output paths.
  • Mix now installs the stable release of Webpack 2.2.0 40ef111
  • Bumped the concatenate dependency. dc1867f
  • mix.autoload() can now be called before mix.js() without breaking. f00a04f
  • mix.autoload() now allows the library value to be a string or an array. 6de265d