-
-
Notifications
You must be signed in to change notification settings - Fork 211
You can now set custom config path. #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for PR. Let’s discuss one thing. Main idea behind common PostCSS config is to share same config between different tools: webpack-loader, IDE, etc. With Does |
As for your question, it seems that you cannot change your Actually, I don't use
And below is my project folder.
There are some people like me who love organizing config files in one place. I think it's not a harmful option. As for webpack-dev-server, it has p.s. |
I like clean project tree too. But I think right now root is a common place for config 😆. Because I love global config idea. What do you think about this solution. We will add this option, but still not as part of public API? It will not be in docs to not blocking global config promotion. OK? |
Good. I agree that my personal preference(separate folder for config) is a bit minor. So, I think that your solution is the best for everyone. Then, I will send you another PR that meets code convention. |
@sainthkh The behaviour you want to achieve is having all config files in a separate e.g
If you want to have it all in one place and don't need a function as config => package.json {
"name": "",
"version": "",
"scripts": "",
"dependencies": {}
"postcss": { parser: "", plugins: {}}
"babel": { env: {}, presets: [] }
...
} |
@michael-ciniawsky Yes, that's possible. However, PostCSS has a lot of configuration. In json file, you cannot handle them. So, if you want to move postcss.config.js to |
@sainthkh Yep, I understand, was not meant to be against it, asked to clearify usecase :) |
I personally organize all of my build settings to "build" folder. However, postcss-loader only accepts configuration files in its ancestor folders.
So, I changed the code to accept the custom configuration path by
'postcss?config=./the/path/to/your/config/file/from/the/root',
I hope you like it.