Releases: laravel-mix/laravel-mix
Releases · laravel-mix/laravel-mix
v0.9.0
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 tobabel-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 ofwebpack-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
Additions
- Added
mix.scripts()
andmix.styles()
, which are aliases formix.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 forjpg
andjpeg
s. 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
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 tomix.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 tomix.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 ifwindow.jQuery
is defined. f83b54f - Fixed an issue that caused certain old versioned files to not be deleted properly. 3c8bb72
v0.7.4
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
Potentially Breaking
- If
mix.version()
is applied, the output path formix.combine(src, output)
will now automatically be versioned. If yourwebpack.mix.js
file includes bothmix.combine()
andmix.version()
, ensure that, in your HTML, you're referencing the proper output path for yourmix.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 formix.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
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 yourmix-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 aquiet: true
option fordevServer
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.
. Soapp.js
would minify toapp.min.js
.
v0.6.1
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()
andmix.less()
, as the third argument. c4553a9 - During production builds, we now automatically drop any lingering
console.log
s eaab1fe
v0.6.0
Additions
- You may now compile Sass and Less at the same time. Before, you could only do
mix.sass()
ormix.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 tomix.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()
beforemix.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
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
v0.5.7
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, domix.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 allmix.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 beforemix.js()
without breaking. f00a04fmix.autoload()
now allows the library value to be a string or an array. 6de265d