我仍然在Laravel项目中使用gulp,因为我拒绝使用webpack,这完全是一团糟。我的gulpfile是这样的:
var elixir = require('laravel-elixir');
elixir.config.css.sass.pluginOptions.precision = 10;
elixir.config.sourcemaps = false;
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
temp
*/
elixir(function (mix) {
mix.sass('app.scss')
.browserify('app.js')
.copy('resources/assets/libs/font-awesome-4.6.3/fonts', 'resources/fonts')
.copy('node_modules/jquery-ui-bundle/images', 'public/css/images')
.scripts('script.js')
//various other scripts
.scripts('scriptN.js');
});
我读过真棒的字体,导致此循环,建议的解决方案是将字体从public/fonts
移到resources/fonts
,您可以看到我已经做了,但是没有做任何更改。
Laravel版本是5.6.26,gulp版本是
gulp -v
[19:22:34] CLI version 3.9.0
[19:22:34] Local version 3.9.1