How to purgecss a secondary css apart from the main tailwind one (Sage 10)


I splitted a css file for specific pages, and I want to purge it the same way as tailwind does. But I don’t know how to start as Tailwind has a very complicated process of doing so with its layers.

Has someone experience with this?

This is the line of code I think has to be modified in webpack.mix.js:

  .sass('resources/styles/app.scss', 'styles')
  .sass('resources/styles/plyr.scss', 'styles') // <--- this is the file I want to purge
  .sass('resources/styles/editor.scss', 'styles')
    processCssUrls: false,
    postCss: [require('tailwindcss')],

You’d need to use the external laravel-mix-purgecss package that Sage 10 used to use

1 Like