johannschopplich / kirbyup

🆙 Official bundler for Kirby Panel plugins
https://kirbyup.getkirby.com
MIT License
51 stars 3 forks source link

fix/postcss-conf-stopdir #42

Closed jonaskuske closed 1 year ago

jonaskuske commented 1 year ago

kirbyup uses unconfig to load its config file, which (by default) searches the file tree upwards until it reaches the current working directory. To load PostCSS configuration, kirbyup uses postcss-load-config, which in turn uses lilconfig, a zero-dependency alternative to cosmiconfig with the same API. By default, lilconfig and cosmiconfig also crawl up the file tree, but don't stop at the current working directory, only at the user's home dir. Due to this, kirbyup was loading PostCSS config that was located outside the directory of the Kirby plugin. This change sets the stopDir option to cwd when loading the PostCSS config so that it behaves like kirbyup config loading and does not reach out of the current working directory.

closes #14