Developmint / nuxt-purgecss

Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
MIT License
479 stars 19 forks source link

[BREAKING] set postcss mode as default #15

Closed manniL closed 4 years ago

riveraeu commented 5 years ago

Hey is this why I am seeing the following error message when I generate my static site?

ERROR Webpack mode only works with build.extractCSS set to *true*. Either extract your CSS or use 'postcss' mode

manniL commented 5 years ago

The error is pretty self-descriptive.

Either use build.extractCSS: true or the postcss mode.

Examples are in tests/fixtures

mornir commented 5 years ago

Like this: https://youtu.be/-Z1hI4Wxblo?t=1337 😉

marcfilleul commented 5 years ago

Hi,

As explained in the issue #46, I've made several tests because I've had scroll issues when using the module.

Webpack mode with Extract CSS was causing scroll issues for me and I've solved it by using postcss mode.

So I guess it's should definitively be the default mode ;)

bjesus commented 4 years ago

Can someone please give a one/two sentences explanation about the pros and cons of postcss vs extractCSS? I understand that I can choose between the two but have no idea which one is better for me. why would one pick one over the other? does it matter?

manniL commented 4 years ago

Resolved

manniL commented 4 years ago

Can someone please give a one/two sentences explanation about the pros and cons of postcss vs extractCSS? I understand that I can choose between the two but have no idea which one is better for me. why would one pick one over the other? does it matter?

Usually you want to use it with postcss. Otherwise, your CSS is extracted in different files (not included in the component files). This can be useful if you have e.g. only global CSS.