penthouse
penthouse copied to clipboard
forceExclude is ignored / not working
Hello,
I'm using [email protected] and it seems forceExclude never works forceInclude works perfectly however. I don't see what I'm doing wrong...
This is how I implemented it, has anyone encountered similar issues with this option ?
function runPenthouse(templateName, urlToScan){
return gulp.src('./style.css').pipe(criticalCss({
out: '-' + templateName + '-critical.css', // output file name
url: urlToScan, // url from where we want penthouse to extract critical styles
width: 1400, // max window width for critical media queries
height: 2000, // max window height for critical media queries
forceExclude: ['.testimonial-card-img'],
userAgent: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' // pretend to be googlebot when grabbing critical page styles.
}))
.pipe(cleanCSS())
.pipe(gulp.dest('./assets/critical-css/css/'))
.on('end', function() {
counter.current+=1;
if(counter.current < counter.max ){
generateCriticalCss(pages[counter.current]);
}
});
}
Greetings,