Closed ebrahimirad closed 4 years ago
This is indeed an issue. The most common use case is admin panel + public facing apps in a single Laravel app. They could have completely separate assets.
Would love to see this too. i use separate css for admin and frontend.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
I think the case is still relevant and it deserves attention.
I'm having the same issue
This approach did the trick for me: https://github.com/spatie/laravel-mix-purgecss/issues/73#issuecomment-523490163
Hi dear friends, I have multiple SCSS files for different pages but final PurgeCss command apply on all css files. Please help me, thanks
`mix.sass('resources/assets/sass/app.scss', 'public/build/css').options({ processCssUrls: false }).purgeCss({ enabled: true, whitelistPatterns: whitelistPatterns }).version();
mix.sass('resources/assets/sass/app-home.scss', 'public/build/css').options({ processCssUrls: false }).purgeCss({ enabled: true, paths: () => glob.sync([ path.join(dirname, 'resources/views/layouts/app.blade.php'), path.join(dirname, 'resources/views/layouts/flushMessage.blade.php'), path.join(dirname, 'resources/views/layouts/appHeader.blade.php'), path.join(dirname, 'resources/views/layouts/appFooter.blade.php'), path.join(dirname, 'resources/views/layouts/callNumber.blade.php'), path.join(dirname, 'resources/views/home.blade.php'), path.join(__dirname, 'resources/views/home/*.blade.php'), ]), whitelistPatterns: whitelistPatterns }).version();
mix.sass('resources/assets/sass/app-teacher-list.scss', 'public/build/css').options({ processCssUrls: false }).purgeCss({ enabled: true, paths: () => glob.sync([ path.join(dirname, 'resources/views/layouts/app.blade.php'), path.join(dirname, 'resources/views/layouts/flushMessage.blade.php'), path.join(dirname, 'resources/views/layouts/appHeader.blade.php'), path.join(dirname, 'resources/views/layouts/appFooter.blade.php'), path.join(dirname, 'resources/views/layouts/callNumber.blade.php'), path.join(dirname, 'resources/views/teacherList.blade.php'), ]), whitelistPatterns: whitelistPatterns }).version();`