Skip to content

Commit

Permalink
docs: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito committed Jul 19, 2021
1 parent 3928488 commit 3b0bf60
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Expand Up @@ -980,11 +980,13 @@ module.exports = {

##### `namedExport`

Type: `Boolean`
Type: `Boolean|Function`
Default: `false`

Enables/disables ES modules named export for locals.

###### `Boolean`

> ⚠ Names of locals are converted to camelcase, i.e. the `exportLocalsConvention` option has `camelCaseOnly` value by default.
> ⚠ It is not allowed to use JavaScript reserved words in css class names.
Expand Down Expand Up @@ -1031,6 +1033,32 @@ module.exports = {
};
```

###### `Function`

If `namedExport` function, `exportLocalsConvention` option is ignored;

**webpack.config.js**

```js
module.exports = {
module: {
rules: [
{
test: /\.css$/i,
loader: "css-loader",
options: {
modules: {
namedExport: function (name) {
return name.replace(/-/g, "_");
},
},
},
},
],
},
};
```

##### `exportGlobals`

Type: `Boolean`
Expand Down

0 comments on commit 3b0bf60

Please sign in to comment.