File tree 1 file changed +3
-1
lines changed
webpack-plugin/src/loaders 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,14 @@ export const pitch: PitchLoaderDefinitionFunction<ILoaderOptions> = function pit
26
26
return loaderUtils . stringifyRequest ( this , request ) ;
27
27
} ;
28
28
29
+ // editor.main.js contains all features and languages, replace it with requested features, languages and editor.api.js
30
+ const apiRequest = remainingRequest . replace ( / e d i t o r \. m a i n \. j s $ / , 'editor.api.js' ) ;
29
31
return [
30
32
...( globals
31
33
? Object . keys ( globals ) . map ( ( key ) => `self[${ JSON . stringify ( key ) } ] = ${ globals [ key ] } ;` )
32
34
: [ ] ) ,
33
35
...pre . map ( ( include : any ) => `require(${ stringifyRequest ( include ) } );` ) ,
34
- `module.exports = require(${ stringifyRequest ( `!!${ remainingRequest } ` ) } );` ,
36
+ `module.exports = require(${ stringifyRequest ( `!!${ apiRequest } ` ) } );` ,
35
37
...post . map ( ( include : any ) => `require(${ stringifyRequest ( include ) } );` )
36
38
] . join ( '\n' ) ;
37
39
} ;
You can’t perform that action at this time.
0 commit comments