Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
webdiscus committed Apr 19, 2024
1 parent d403863 commit b13b216
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 3.10.0 (2024-04-18)

- feat: add support the [CSS Modules](https://github.com/css-modules/css-modules) for styles imported in JS using the [css-loader modules](https://github.com/webpack-contrib/css-loader#modules) option.\
Required: `css-loader` >= `7.0.0`\
The CSS _module rule_ in the webpack config:
```js
{
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ See [boilerplate](https://github.com/webdiscus/webpack-html-scss-boilerplate)
- [How to config `splitChunks`](#recipe-split-chunks)
- [How to keep package name for **split chunks** from **node_modules**](#recipe-split-chunks-keep-module-name)
- [How to split CSS files](#recipe-split-css)
- [How to split CSS files](#recipe-split-css)
2. [Problems & Solutions](#solutions)
- [Automatic resolving of file extensions](#solutions-resolve-extensions)
- [How to use `@import url()` in CSS](#solutions-import-url-in-css)
Expand Down Expand Up @@ -5259,6 +5258,8 @@ See the [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/API
## How to import CSS class names in JS
**Required:** `css-loader >= 7.0.0`
To import style `class names` in JS, add in the webpack config the [modules](https://github.com/webpack-contrib/css-loader#modules) option into `css-loader`:
```js
{
Expand All @@ -5284,7 +5285,7 @@ For example there is _./style.css_ file:
}
```
In _./main.js_ file you can use class names with `camelCase`:
In _./main.js_ file you can use the class name with `camelCase`:
```js
import styles from './style.css';

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b13b216

Please sign in to comment.