Skip to content
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

Unlock PostCSS config so we can actually use it (with plugins like nesting) without ejecting or downloading a redundant SASS dependency #12638

Open
matronator opened this issue Aug 6, 2022 · 0 comments

Comments

@matronator
Copy link

Is your proposal related to a problem?

I see that PostCSS is included by default in CRA, which is great! But it's kinda useless right now as CRA ignores PostCSS config, so there is no way to use the actually useful PostCSS stuff like nesting or imports etc without ejecting (and losing all the benefits of CRA).

I mean, it kinda makes no sense to have PostCSS installed by default, but not allowing any plugins, so that users who don't want to eject don't have any other option than installing SASS and using that instead. And then you're left with a basically useless PostCSS dependency when you're using SASS anyways. Like who uses both PostCSS and SASS in one project? Either go full SASS and ditch the PostCSS, or even better yet, drop the SASS and replace it with postcss-nesting || postcss-nested and postcss-import or allow users to define their own plugins via postcss.config.js.

Describe the solution you'd like

Make CRA pickup on user-provided postcss.config.js file to configure PostCSS plugins and whatnot. Or if you don't want to unlock the full config, then at least have some custom config file where you would just specify the plugins you want to use and CRA would sort it out.

Describe alternatives you've considered

Ejecting - loses the point of CRA
Use SASS instead - doesn't make much sense (in 2022 at least) to use SASS with PostCSS

Additional context

#9604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant