File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,10 @@ export function pitch(request) {
87
87
if ( ! source ) {
88
88
return callback ( new Error ( "Didn't get a result from child compiler" ) ) ;
89
89
}
90
- let text ;
90
+ let text , locals ;
91
91
try {
92
92
text = exec ( this , source , request ) ;
93
+ locals = text && text . locals ;
93
94
if ( ! Array . isArray ( text ) ) {
94
95
text = [ [ null , text ] ] ;
95
96
} else {
@@ -108,8 +109,8 @@ export function pitch(request) {
108
109
return callback ( e ) ;
109
110
}
110
111
let resultSource = '// extracted by mini-css-extract-plugin' ;
111
- if ( text . locals && typeof resultSource !== 'undefined' ) {
112
- resultSource = `module .exports = ${ JSON . stringify ( text . locals ) } ;` ;
112
+ if ( locals && typeof resultSource !== 'undefined' ) {
113
+ resultSource + = `\nmodule .exports = ${ JSON . stringify ( locals ) } ;` ;
113
114
}
114
115
115
116
return callback ( null , resultSource ) ;
You can’t perform that action at this time.
0 commit comments