Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp-useref - excessive re-minifications #728

Open
olzhaskaliyev opened this issue Oct 6, 2018 · 1 comment
Open

Gulp-useref - excessive re-minifications #728

olzhaskaliyev opened this issue Oct 6, 2018 · 1 comment
Assignees
Milestone

Comments

@olzhaskaliyev
Copy link

olzhaskaliyev commented Oct 6, 2018

Hello! I have gulp configuration with Pug compilation. When running task with gulp-useref is minificate sames css/js files repeatly on every html page.
I tried use gulp-cache, but seems i use this wrong.
There is my gulpfile.js:

gulp.task('minimization', ['templates', 'styles', 'scripts'], () => {
  return gulp.src('.tmp/*.html')
    .pipe($.useref({searchPath: ['.tmp', '.']}))
    .pipe($.if(/\.css$/, $.cache($.cssnano({safe: true, autoprefixer: false}))))
    .pipe($.if(/\.js$/, $.cache($.uglify({compress: {drop_console: true}}))))
    .pipe(gulp.dest('dist'))
    .pipe($.size({title: 'minimized', showFiles: true}));
});
@UlisesGascon
Copy link
Member

We made a major changes in the Generator and we need to update the recepies. This process is currently ongoing #742. Did you find a solution? Do you want to help us improve the recipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants