The stylesheet http: // localhost: 3000 / src / css / component.css was not loaded because its MIME type, "text / html", is not "text / css"
The reason for the error is
you are only allowed access to the public directory when it is displayed in the browser, therefore
→ - ../src/css/
, , HTML
→ -, CSS :
<link rel="stylesheet" type="text/css" href="../src/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="../src/css/demo.css" />
<link rel="stylesheet" type="text/css" href="../src/css/component.css" />
css ( js ):
import './css/component.css';
(react-scripts start
) React css js .
, CSS , CSS ( public/css)
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
, , :
https://github.com/facebookincubator/create-react-app/blob/master/README.md#getting-started
, .