spatie / laravel-mix-purgecss

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

not work with bootstrap 4 #55

Closed hosamalzagh closed 6 years ago

hosamalzagh commented 6 years ago

not work with bootstrap 4 remove most code

cjmaxik commented 6 years ago

Any examples of resulting code will be nice

sebastiandedeyne commented 6 years ago

If this is still a problem, please reopen an issue containing your actual output, expected output, and configuration.

sinandomeng commented 5 years ago

By default when we use the scaffold front end stuff prepared by Laravel, it will let us use bootstrap immediately.

However, upon adding PurgeCSS in the webpack.mix.js without adding any additional option, bootstrap javascript functionality such as dropdowns and stuff did not work properly.

I think this is what @hosamalzagh means. Any fix?

NOTE: Unused CSS removal works fine.

sebastiandedeyne commented 5 years ago

We don't use bootstrap here so I can't really do any meaningful contribution. I'd be open to PR's that add some example Bootstrap settings to the readme.

sinandomeng commented 5 years ago

Yeah, that's the problem. Since such dropdown and other functionality that involve classes are being added to the dom using javascript. So in the initial load, Purge CSS can't read the classes.

I hope I will find time to contribute.

For now, I guess we'll be looking into other CSS frameworks that are not relying too much on javascript like Bulma CSS.

Anyway, thank you for this great plugin! We're lovin it.