@@ -439,7 +439,7 @@ Output (example):
439
439
> Identifiers are exported
440
440
441
441
``` js
442
- exports .locals = {
442
+ module . exports .locals = {
443
443
className: " _23_aKvs-b8bW2Vg3fwHozO" ,
444
444
subClass: " _13LGdX8RMStbBE9w-t0gZ1" ,
445
445
};
@@ -468,7 +468,7 @@ When declaring a local class name, you can compose it from one or more other loc
468
468
This does not alter the final CSS output, but the generated ` subClass ` will include both class names in its export.
469
469
470
470
``` js
471
- exports .locals = {
471
+ module . exports .locals = {
472
472
className: " _23_aKvs-b8bW2Vg3fwHozO" ,
473
473
subClass: " _13LGdX8RMStbBE9w-t0gZ1 _23_aKvs-b8bW2Vg3fwHozO" ,
474
474
};
@@ -1547,7 +1547,7 @@ function addReplacements(resourcePath, imports, exportsJson, replacements) {
1547
1547
// canonical values map and all exports JSON verbatim
1548
1548
canonicalValuesMap[identifier] = classNames;
1549
1549
1550
- allExportsJson[resourcePath] = allExportsJson[resourcePath] || {};
1550
+ allExportsJson[resourcePath] || = {};
1551
1551
allExportsJson[resourcePath][localName] = classNames;
1552
1552
}
1553
1553
}
@@ -1609,7 +1609,7 @@ class CssModulesJsonPlugin {
1609
1609
1610
1610
const [, resourcePath , localName ] = identifier .match (IDENTIFIER_REGEX );
1611
1611
1612
- allExportsJson[resourcePath] = allExportsJson[resourcePath] || {};
1612
+ allExportsJson[resourcePath] || = {};
1613
1613
allExportsJson[resourcePath][localName] = adjustedClassNames;
1614
1614
}
1615
1615
@@ -2323,8 +2323,8 @@ File treated as `CSS Module`.
2323
2323
Using both ` CSS Module ` functionality as well as SCSS variables directly in JavaScript.
2324
2324
2325
2325
``` jsx
2326
- import * as styles from " Component.module.scss" ;
2327
- import * as svars from " variables.scss" ;
2326
+ import * as _styles from " ./ Component.module.scss" ;
2327
+ import * as _svars from " ./ variables.scss" ;
2328
2328
2329
2329
// Render DOM with CSS modules class name
2330
2330
// <div className={styles.componentClass}>
@@ -2333,7 +2333,7 @@ import * as svars from "variables.scss";
2333
2333
2334
2334
// Somewhere in JavaScript canvas drawing code use the variable directly
2335
2335
// const ctx = mountsCanvas.current.getContext('2d',{alpha: false});
2336
- ctx .fillStyle = ` ${ svars .colorBackgroundCanvas } ` ;
2336
+ // ctx.fillStyle = `${svars.colorBackgroundCanvas}`;
2337
2337
```
2338
2338
2339
2339
## Contributing
0 commit comments