2

why does my create-react-app break when I delete the index.css file during cleaning the app

4
  • Hi, what is the error? probably it breaks because it is used in some files . Commented Apr 26, 2020 at 22:40
  • To further Oscars point, you're likely still trying to import the index.css file in your index.js file. But I agree, an error message would be useful. Commented Apr 26, 2020 at 22:44
  • 1
    I think create-react-app is using webpack in the background. Webpack is set up to use index.css so when you remove it, it breaks. Why are you deleting it? Commented Apr 26, 2020 at 22:45
  • @Craicerjack thank you answered me very well Commented May 2, 2020 at 10:30

2 Answers 2

3

check your index.js file where its import index.css, so remove the reference.

Sign up to request clarification or add additional context in comments.

Comments

0

Remove the import in the index.js, you'll be good to go.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.