question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PurgeCss on mutiple css files

See original GitHub issue

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();`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

5reactions
divdaxcommented, Dec 14, 2019

Would love to see this too. i use separate css for admin and frontend.

2reactions
ivandokovcommented, Apr 15, 2020

I think the case is still relevant and it deserves attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

multiple html files · Issue #306 · FullHuman/purgecss - GitHub
I need purge a css file which have styles for multiple htmls, I have this script in my package.json: "scripts":{ ... "postbuild": "purgecss...
Read more >
Configuration - PurgeCSS
PurgeCSS is a tool to remove unused CSS from your project.
Read more >
PurgeCSS: Remove unused CSS code - LogRocket Blog
In this tutorial, we'll explore PurgeCSS, a tool for removing unused CSS code. With PurgeCSS as a part of our development workflow, we...
Read more >
PurgeCSS 2.0 Introduction: Remove Unused CSS From Your ...
On the CSS file above, PurgeCSS iterates over the rules, starting with p.It see p in the list and so decide to not...
Read more >
How to overwrite css files modified in PurgeCSS CLI
I'm using PurgeCSS CLI to delete unused css classes in my React project. I'm using this command: purgecss --css src/**/*. css --content src/**/ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found