Cannot set custom name to postcss config file
goldmont opened this issue · 4 comments
postcss-cli: 6.1.3
Hi,
an issue in postcss-load-config dependency is causing a malfunction in your library. When I pass a config file with the option --config, the postcss-load-config library cuts off the config file I specified and then gets its parent folder. Thus my postcss config file with a filename different from one of these listed below isn't loaded.
package.json
.postcssrc
.postcssrc.json
.postcssrc.yaml
.postcssrc.yml
.postcssrc.js
postcss.config.js
I think you should load postcss config in a different way based on whether the --config option value points to a directory or a file.
Thank you for your efforts.
UPDATE:
The issue is a dependency of postcss-load-config called cosmiconfig.
https://github.com/davidtheclark/cosmiconfig/blob/master/src/index.ts#L43-L51
The --config
option can only point to a directory.
It's absurd that I can't specify a config file with custom name.
I don't like it either, but it's an ecosystem-wide standard.
All right, man.