File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ const processor = postcss.plugin('postcss-modules-scope', function(options) {
35
35
let exports = { } ;
36
36
37
37
function exportScopedName ( name ) {
38
- let scopedName = generateScopedName ( name , css . source . input . from ) ;
38
+ let scopedName = generateScopedName ( name , css . source . input . from , css . source . input . css ) ;
39
39
exports [ name ] = exports [ name ] || [ ] ;
40
40
if ( exports [ name ] . indexOf ( scopedName ) < 0 ) {
41
41
exports [ name ] . push ( scopedName ) ;
@@ -156,7 +156,7 @@ const processor = postcss.plugin('postcss-modules-scope', function(options) {
156
156
} ;
157
157
} ) ;
158
158
159
- processor . generateScopedName = function ( exportedName , path ) {
159
+ processor . generateScopedName = function ( exportedName , path , css ) {
160
160
let sanitisedPath = path . replace ( / \. [ ^ \. \/ \\ ] + $ / , '' ) . replace ( / [ \W _ ] + / g, '_' ) . replace ( / ^ _ | _ $ / g, '' ) ;
161
161
return `_${ sanitisedPath } __${ exportedName } ` ;
162
162
} ;
You can’t perform that action at this time.
0 commit comments