Closed MacedoRAC closed 4 years ago
+1
+1
Hi !
Thanks for the plugin, but we have the same problem.
We're using in a laravel 5.8.* project, with sass and vue.
I ask you: could the source of this problem be related to usage scoped sass into vue SFC (single file components) ?
PurgeCSS is not enabled during development build. This is why you do not have any issues. https://github.com/spatie/laravel-mix-purgecss/blob/master/src/index.js#L23
Maybe the styles that you are missing are not found by PurgeCSS in the html and then stripped out. Maybe you need to whitelist third party classes such as plugin related ones (e.g. PrismJS, etc).
PurgeCSS is not enabled during development build. This is why you do not have any issues. https://github.com/spatie/laravel-mix-purgecss/blob/master/src/index.js#L23
Maybe the styles that you are missing are not found by PurgeCSS in the html and then stripped out. Maybe you need to whitelist third party classes such as plugin related ones (e.g. PrismJS, etc).
That was exactly the problem. Some of the classes were add to the DOM dynamically, so PurgeCSS deletes the styles. Thanks.
I'm using PurgeCss with Laravel Mix and when compiled to development everything works fine however when it's compiled to production seems that some classes that are being used on the HTML or Vue components are still being removed from the compiled file.
I'm using the latest version 4.1.0.
This problem was also pointed out on laravel mix github page
Also it's the second project this is happening to me, so for now I'm just commenting it out.
If you need more information/details please let me know.