Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ Then, add the loader to your `webpack` configuration. For example:
**file.js**

```js
import * as css from "file.css";
import * as css from "./file.css";
```

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.

Depending on the configuration, the imported value can expose information from the CSS file, such as exported identifiers when CSS Modules are enabled.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need an absolute wording here to avoid confusion for people reading the documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


If you only want to apply the styles and do not need to access any exports, you can simply write:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt reference anything

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to reference imported module clearly


**webpack.config.js**

```js
Expand Down