postcss/postcss-cli

How to use "--config" ?

MEChasle opened this issue · 3 comments

Hello,
I use postcss.config.js and it works fine.
I try to use npx postcss my-file-input.css -o output/directory --config my.config.js, but I have the message below.

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.

Between this two use cases, just the name of config file has changed.
Do I use --config correctly ?

Thanks for your answer.
Regards

--config specifies the directory to look for the postcss.config.js in. You cannot use a filename like my.config.js, the config file must be postcss.config.js.

Thanks for your precision.
Is it scheduled to use another name for the config file ?

No, we do not plan to allow changing the filename, for compatibility with the rest of the postcss ecosystem