File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 106106 "type" : " boolean" ,
107107 "default" : false
108108 },
109+ "loaderRules" : {
110+ "description" : " Array of matching rules extending the default webpack configuration." ,
111+ "type" : " array" ,
112+ "items" : {
113+ "type" : " object" ,
114+ "properties" : {
115+ "test" : {
116+ "type" : " string"
117+ },
118+ "loader" : {
119+ "type" : " string"
120+ }
121+ },
122+ "required" : [" test" , " loader" ],
123+ "additionalProperties" : false
124+ }
125+ },
109126 "styles" : {
110127 "description" : " Global styles to be included in the build." ,
111128 "type" : " array" ,
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
3030 const nodeModules = path . resolve ( projectRoot , 'node_modules' ) ;
3131
3232 let extraPlugins : any [ ] = [ ] ;
33- let extraRules : any [ ] = [ ] ;
33+ let extraRules : any [ ] = appConfig . loaderRules . map ( ( entry : any ) => {
34+ return { test : new RegExp ( entry . test ) , loader : entry . loader } ;
35+ } ) || [ ] ;
3436 let entryPoints : { [ key : string ] : string [ ] } = { } ;
3537
3638 // figure out which are the lazy loaded entry points
You can’t perform that action at this time.
0 commit comments