Skip to content

Commit 676801b

Browse files
committed
docs: clarify behavior
1 parent 8822772 commit 676801b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ import * as css from "./file.css";
5858

5959
When using `css-loader`(https://github.com/webpack/css-loader), webpack processes the file through configured [loaders] (https://webpack.js.org/concepts/loaders/) and turns it into a JavaScript module.
6060

61-
Depending on the configuration, the imported value can expose information from the CSS file, such as exported identifiers when CSS Modules are enabled.
61+
The imported value is a JavaScript module generated by `css-loader`. When CSS Modules are enabled, this module can export identifiers from the CSS file (such as class name mappings).
6262

6363
If you only want to apply the styles and do not need to access any exports, you can simply write:
6464

65+
```js
66+
import "./file.css";
67+
```
68+
6569
**webpack.config.js**
6670

6771
```js

0 commit comments

Comments
 (0)