PurifyCSS is not removing font-awesome classes
snics opened this issue · comments
I'm using PurifyCSS for gulp with the following settings:
return gulp.src([
`${options.path}/css/**/*.css`,
`!${options.path}/css/**/*.min.css`,
])
.pipe(purify([
`${options.path}/js/**/*.js`,
`!${options.path}/js/prism-components/*.js`,
'./**/devninjas/**/*.hbs',
]))
.pipe(gulp.dest(`${options.path}/css/`));
But this settings don't remove unused font-awesome classes. Do they have an idea what the problem might be?
Same for me. It removes a lot of them, but there are still many that I don't use (.fa-lg, .fa-2x, etc) that are left behind.
Hey, can you try with purifycss-extended
? See here!
I made my own purifycss fork and updated the regular expression to include digits and hypens, and then made my own gulp-purifycss fork to point to my local version of the plugin, and then made gulpfile point to the local version, and I was away.
I had this same issue. Some .fa-*
rules that were indeed unused were removed, e.g, .fa-book:before
, while others that were unused were not removed, e.g., fa-chevron-circle-down:before
.