File tree Expand file tree Collapse file tree 5 files changed +26
-1
lines changed
test/configCases/split-chunks/no-options Expand file tree Collapse file tree 5 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ module.exports = class SplitChunksPlugin {
8383 this . options = SplitChunksPlugin . normalizeOptions ( options ) ;
8484 }
8585
86- static normalizeOptions ( options ) {
86+ static normalizeOptions ( options = { } ) {
8787 return {
8888 chunks : options . chunks || "all" ,
8989 minSize : options . minSize || 0 ,
Original file line number Diff line number Diff line change 1+ module . exports = "a" ;
Original file line number Diff line number Diff line change 1+ require ( "should" ) ;
2+
3+ it ( "should run" , function ( ) {
4+ var a = require ( "./a" ) ;
5+ a . should . be . eql ( "a" ) ;
6+ } ) ;
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ findBundle : function ( i , options ) {
3+ return [ "vendor.js" , "main.js" ] ;
4+ }
5+ } ;
Original file line number Diff line number Diff line change 1+ const SplitChunksPlugin = require ( "../../../../lib/optimize/SplitChunksPlugin" ) ;
2+
3+ module . exports = {
4+ entry : {
5+ vendor : [ "./a" ] ,
6+ main : "./index"
7+ } ,
8+ target : "web" ,
9+ output : {
10+ filename : "[name].js"
11+ } ,
12+ plugins : [ new SplitChunksPlugin ( ) ]
13+ } ;
You can’t perform that action at this time.
0 commit comments