postcss / postcss-cli

CLI for postcss
Other
824 stars 93 forks source link

PostCSS not having any effect #455

Closed remino closed 10 months ago

remino commented 10 months ago

Hi,

I’m trying to use PostCSS in another project with cssnano and autoprefixer.

For some weird reason, no matter what I try, the output CSS PostCSS generates is just an exact copy of the input.css.

I confirmed it is reading my config, as adding any improper syntax in it will make it throw an error. I also tried non-working presets in cssnano, and cssnano could pick up on that, so the plugins are loading.

I tried with both npm and pnpm. That had no effect.

I made a small repo which you can try for yourself and replicate the issue: https://github.com/remino/postcsstest

Any help would be appreciated. Thanks.

remino commented 10 months ago

Okay, so I had to specify the plugins I want to use on the command line. For example:

postcss -u cssnano

So what’s the point for postcss-cli to load my config file, then?

remino commented 10 months ago

Made a typo in config. Typed module.export and not module.exports.

Ah, what a day. lol