File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
webpack-plugin/src/loaders Expand file tree Collapse file tree 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
2626 return loaderUtils . stringifyRequest ( this , request ) ;
2727 } ;
2828
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' ) ;
2931 return [
3032 ...( globals
3133 ? Object . keys ( globals ) . map ( ( key ) => `self[${ JSON . stringify ( key ) } ] = ${ globals [ key ] } ;` )
3234 : [ ] ) ,
3335 ...pre . map ( ( include : any ) => `require(${ stringifyRequest ( include ) } );` ) ,
34- `module.exports = require(${ stringifyRequest ( `!!${ remainingRequest } ` ) } );` ,
36+ `module.exports = require(${ stringifyRequest ( `!!${ apiRequest } ` ) } );` ,
3537 ...post . map ( ( include : any ) => `require(${ stringifyRequest ( include ) } );` )
3638 ] . join ( '\n' ) ;
3739} ;
You can’t perform that action at this time.
0 commit comments