Create-react-app: Remove the css files

Created on 18 Jul 2017  路  3Comments  路  Source: facebook/create-react-app

Hello everyone!

Im using Sass, but I don't want to keep the .css files, just the scss.
For example, in my project I have: Login.js, Login.css and Login.scss.
Is it really neccessary to keep those css files?

Thanks!

question

Most helpful comment

What about generating only the main App.css and not creating a css file for every other scss file?

All 3 comments

Take a look at https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc if you haven't already. But the idea is that the boilerplate .css files can be renamed to .scss

Yes, you must keep them due to us not having first-class integration with Sass.
You can, however, ignore them from version control.

You can add src/**/*.css to your .gitignore.
If you've already committed these you can run git rm src/**/*.css.

What about generating only the main App.css and not creating a css file for every other scss file?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ap13p picture ap13p  路  3Comments

oltsa picture oltsa  路  3Comments

Evan-GK picture Evan-GK  路  3Comments

alleroux picture alleroux  路  3Comments

fson picture fson  路  3Comments