Skip to content

Commit

Permalink
Updates README.md for css-loader versions below 3
Browse files Browse the repository at this point in the history
  • Loading branch information
unematiii committed Oct 7, 2020
1 parent e432822 commit 929c0a7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ const getLocalIdent = getLocalIdentName();
},
```

For `css-loader` versions below `3.*`, `modules` options should be specified in loader `options` block instead:

```js
const { getLocalIdentName } = require('css-loader-shorter-classnames');

const getLocalIdent = getLocalIdentName();

// Loader options
{
// ...
loader: 'css-loader',
options: {
modules: true,
getLocalIdent: getLocalIdent,
},
},
```

## Enable only for production
```js
const { getLocalIdentName } = require('css-loader-shorter-classnames');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "css-loader-shorter-classnames",
"version": "1.0.4",
"version": "1.0.5",
"description": "Provides short class name generator for css-loader with CSS Modules enabled",
"main": "index.js",
"files": [
Expand Down

0 comments on commit 929c0a7

Please sign in to comment.