Description:
Purifying option doesnt work while compiling css files.Can you explain what is wrong with this approach?
Steps To Reproduce:
This is inside my mix file:
mix.style('resources/assets/css/some.css', 'public/css/some.css').options({
purifyCss: {
paths: ['/home/smolen/Projects/laravel-test/resources/views/welcome.blade.php'],
verbose:true,
minimize:true,
}
})
This is my css file which stay the same after compiling:
.unused-class{
color:red;
}
.used-class{
color:blue;
}
```
This is in my blade file:
<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
</head>
<body>
<div class="used-class"></div>
</body>
</html>
style
will only minify your css. It won't applypurgeCss
to it.To purge your css, you should rename
some.css
tosome.scss
and