File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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) {
8787 if ( ! source ) {
8888 return callback ( new Error ( "Didn't get a result from child compiler" ) ) ;
8989 }
90- let text ;
90+ let text , locals ;
9191 try {
9292 text = exec ( this , source , request ) ;
93+ locals = text && text . locals ;
9394 if ( ! Array . isArray ( text ) ) {
9495 text = [ [ null , text ] ] ;
9596 } else {
@@ -108,8 +109,8 @@ export function pitch(request) {
108109 return callback ( e ) ;
109110 }
110111 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 ) } ;` ;
113114 }
114115
115116 return callback ( null , resultSource ) ;
You can’t perform that action at this time.
0 commit comments