postcss / postcss-load-config

Autoload Config for PostCSS
MIT License
642 stars 72 forks source link

Consider using .search instead of .load for getting config #181

Open Andarist opened 5 years ago

Andarist commented 5 years ago

I assume that postcss config should be project specific - and thus the config loading should search from cwd rather than from the file which has to be transpiled. Or maybe both strategies are valid, but they should be applied for different files - load for files within cwd, search for files outside of it (especially for files inside node_modules)

Without it monorepos with hoisted node_modules (lerna, yarn workspaces) have trouble time loading configs for files located inside node_modules

Related - https://github.com/davidtheclark/cosmiconfig/issues/166

chalkygames123 commented 5 years ago

Maybe also related to #159

chalkygames123 commented 5 years ago

Hi @michael-ciniawsky, would you please address this issue? I am facing a relevant problem 😢