spatie / laravel-mix-purgecss

Zero-config Purgecss for Laravel Mix
https://spatie.be/en/opensource
MIT License
874 stars 38 forks source link

Two Sass files, only the first one gets purged #24

Closed alesvaupotic closed 6 years ago

alesvaupotic commented 6 years ago

This config

mix
  .js("resources/assets/js/app.js", "public/js")
  .sass("resources/assets/css/main.scss", "public/css")
  .sass("resources/assets/css/auth.scss", "public/css")
  .purgeCss()
  ...

produces only one purged file:

        Asset     Size  Chunks             Chunk Names
   /js/app.js   202 kB       0  [emitted]  /js/app
/css/main.css  8.85 kB       0  [emitted]  /js/app
/css/auth.css   230 kB    0, 0  [emitted]  /js/app, /js/app

Is this intentional? Because it sure is not expected. If you swap the order of Sass files, again the first one gets purged, the second one is ignored.

cjmaxik commented 6 years ago

Should be resolved in v2.0 (#23) image

alesvaupotic commented 6 years ago

Works as advertised.

              Asset     Size  Chunks             Chunk Names
         /js/app.js   107 kB       0  [emitted]  /js/app
/js/x-components.js   3.4 kB       1  [emitted]  /js/x-components
      /css/main.css  13.2 kB       0  [emitted]  /js/app
      /css/auth.css  7.59 kB    0, 0  [emitted]  /js/app, /js/app
alesvaupotic commented 6 years ago

Solved in 2.0.0.