简体   繁体   中英

How can I disable CSS builds in create-react-app without ejecting?

I'm building a widget using Aphrodite for my styles and don't want CSS generation. How can I disable the CSS build target in create-react-app without ejecting it?

In an era of frustration, where JavaScripters wanted to get on the React train but didn't want to go through the work of a custom project build setup. create-react-app was born as a no-config way of making this happen and it was never meant to be cracked open.

Whilst it surely may be possible to hack create-react-app it is strongly not recommended to do so as you may end up with a broken boilerplate and the authors will be very unlikely to help.

Unfortunately, if you do not eject you cannot do any modification to webpack configuration. Keep in mind that if you do eject, there will be no way back. You'd have to maintain the application by yourself.

Boilerplate like create-react-app are very helpful to get started. Once you need your own customization, ejection is the only solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM