Answer the question
In order to leave comments, you need to log in
Why does gulp uncss remove almost all styles?
Hello. I decided to try the plugin, but for some reason it clears all styles except fonts. What could be the problem?
gulp.task('uncss', function() {
return gulp.src('src/css/*.css')
.pipe(uncss({
html: 'src/index.html'
}))
.pipe(gulp.dest('src/css'))
})
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>LandX</title>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/libs.min.css">
</head>
<body>
<script src="js/libs.min.js"></script>
<script src="js/common.js"></script>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Теперь все ясно. И где вы тут видите хоть один класс в index.html?
Гуглите в сторону "uncss single page application".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question