5 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file,!5360Docusaurus,!5347Port user guide over
> Note: this feature is available with `react-scripts@2.0.0` and higher.
This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the `[name].module.css` file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format `[filename]\_[classname]\_\_[hash]`.
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](#adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules [here](https://css-tricks.com/css-modules-part-1-need/).
### `Button.module.css`
```css
.error{
background-color:red;
}
```
### `another-stylesheet.css`
```css
.error{
color:red;
}
```
### `Button.js`
```js
importReact,{Component}from'react';
importstylesfrom'./Button.module.css';// Import css modules stylesheet as styles
<!-- This button has red background but not red text -->
<buttonclass="Button_error_ax7yz"></div>
```
**This is an optional feature.** Regular `<link>` stylesheets and CSS files are fully supported. CSS Modules are turned on for files ending with the `.module.css` extension.
-[Alternatives to Ejecting](#alternatives-to-ejecting)
## Adding a CSS Modules Stylesheet
> Note: this feature is available with `react-scripts@2.0.0` and higher.
This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the `[name].module.css` file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format `[filename]\_[classname]\_\_[hash]`.
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](#adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
CSS Modules let you use the same CSS class name in different files without worrying about naming clashes. Learn more about CSS Modules [here](https://css-tricks.com/css-modules-part-1-need/).
### `Button.module.css`
```css
.error{
background-color:red;
}
```
### `another-stylesheet.css`
```css
.error{
color:red;
}
```
### `Button.js`
```js
importReact,{Component}from'react';
importstylesfrom'./Button.module.css';// Import css modules stylesheet as styles
<!-- This button has red background but not red text -->
<buttonclass="Button_error_ax7yz"></div>
```
**This is an optional feature.** Regular `<link>` stylesheets and CSS files are fully supported. CSS Modules are turned on for files ending with the `.module.css` extension.
## Adding a Sass Stylesheet
> Note: this feature is available with `react-scripts@2.0.0` and higher.