[英]Laravel elixir combine some file, but minify just some of them
Iv've got three files: a.min.js, b.min.js and c.js iv有三个文件:a.min.js,b.min.js和c.js
I would like to minify c.js, and then combine a + b + c into a unique file using laravel elixir. 我想缩小c.js,然后使用laravel elixir将一个+ b + c组合成一个唯一的文件。 Is it possible? 可能吗? Now I'm using this script: 现在,我正在使用此脚本:
elixir(mix => {
mix.sass('app.scss')
.webpack('app.js')
.combine([
'resources/assets/js/plugins/a.min.js',
'resources/assets/js/plugins/b.min.js',
'resources/assets/js/plugins/c.js'
], 'public/js/plugins/xxx.js');
});
But obviously c.js is not minified. 但是显然c.js没有被缩小。
In order to minify a file you have to call gulp with the --production
parameter. 为了缩小文件,您必须使用--production
参数调用gulp。
It's only possible to minify all or nothing. 最小化全部或全无。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.