This project setup uses webpack for handling all assets. webpack offers a custom way of “extending” the concept of
This is not required for React but many people find this feature convenient. You can read about the benefits of this approach here. However you should be aware that this makes your code less portable to other build tools and environments than webpack.
In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified
.css file in the build output.
If you are concerned about using webpack-specific semantics, you can put all your CSS right into
src/index.css. It would still be imported from
src/index.js, but you could always remove that import if you later migrate to a different build tool.