File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -510,17 +510,24 @@ export class Kaba
510
510
] ,
511
511
} ;
512
512
513
- return Object . keys ( entries ) . map ( ( entryFile , index ) =>
513
+ return Object . keys ( entries ) . map ( entryFile =>
514
514
{
515
515
let config = Object . assign ( { } , configTemplate , {
516
516
entry : {
517
517
[ entryFile ] : entries [ entryFile ] ,
518
518
} ,
519
519
} ) as Partial < webpack . Configuration > ;
520
520
521
- if ( isModule && undefined !== config . module )
521
+ if ( ! isModule && undefined !== config . module )
522
522
{
523
- ( config . module . rules as any ) . push ( {
523
+ config . module = Object . assign ( { } , config . module ) ;
524
+ let rules : webpack . RuleSetRule [ ] = [ ] ;
525
+
526
+ config . module . rules . forEach ( rule => {
527
+ rules . push ( rule ) ;
528
+ } ) ;
529
+
530
+ rules . push ( {
524
531
// ESLint
525
532
test : / \. m ? j s x ? $ / ,
526
533
// only lint files that are in the project dir & exclude tests, vendor and node_modules
@@ -536,6 +543,8 @@ export class Kaba
536
543
emitWarning : true ,
537
544
} ,
538
545
} ) ;
546
+
547
+ config . module . rules = rules ;
539
548
}
540
549
541
550
return config ;
You can’t perform that action at this time.
0 commit comments