diff --git a/CHANGELOG.md b/CHANGELOG.md index bf47788a..abfa60dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 { diff --git a/README.md b/README.md index fbbaddb2..11984b7f 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 { @@ -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'; diff --git a/package-lock.json b/package-lock.json index 0aac8c27..209abdeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "html-bundler-webpack-plugin", - "version": "3.9.1", + "version": "3.10.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "html-bundler-webpack-plugin", - "version": "3.9.1", + "version": "3.10.0", "license": "ISC", "dependencies": { "@types/html-minifier-terser": "^7.0.2", @@ -78,7 +78,7 @@ "favicons": ">=7.1.4", "handlebars": ">=4.7.7", "liquidjs": ">=10.7.0", - "markdown-it": ">=13.0.1", + "markdown-it": ">=12", "mustache": ">=4.2.0", "nunjucks": ">=3.2.3", "parse5": ">=7.1.2",