2017-01-07 10:36:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"use strict" ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 20:51:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require ( "./helpers/warmup-webpack" ) ;  
						 
					
						
							
								
									
										
										
										
											2016-09-19 06:54:35 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-18 23:29:47 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								describe ( "Validation" ,  ( )  =>  {  
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									const  createTestCase  =  ( name ,  config ,  fn )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-31 10:39:30 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										it ( ` should fail validation for  ${ name } ` ,  ( )  =>  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											try  { 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-15 20:51:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												const  webpack  =  require ( ".." ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												webpack ( config ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}  catch  ( err )  { 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												if  ( err . name  !==  "ValidationError" )  throw  err ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( err . message ) . toMatch ( /^Invalid configuration object./ ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												fn ( err . message ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											throw  new  Error ( "Validation didn't fail" ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( "undefined configuration" ,  undefined ,  msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										 -  configuration  should  be  an  object : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										   - >  Options  object  as  provided  by  the  user . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( "null configuration" ,  null ,  msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										 -  configuration  should  be  an  object : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										   - >  Options  object  as  provided  by  the  user . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"empty entry string" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "" 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-19 06:54:35 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-05 23:42:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . entry  should  be  a  non - empty  string . 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-05 15:28:49 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  The  string  is  resolved  to  a  module  which  is  loaded  upon  startup . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"empty entry bundle array" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												bundle :  [ ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2017-01-04 13:23:57 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-05 23:42:08 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . entry [ 'bundle' ]  should  be  a  non - empty  array . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  All  modules  are  loaded  upon  startup .  The  last  one  is  exported . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"invalid instanceof" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											module :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												wrappedContextRegExp :  1337 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-04 06:52:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-21 21:04:20 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . module . wrappedContextRegExp  should  be  an  instance  of  RegExp . 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-20 22:08:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Set  the  inner  regular  expression  for  partial  dynamic  dependencies .  Deprecated :  This  option  has  moved  to  'module.parser.javascript.wrappedContextRegExp' . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"invalid minimum" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											parallelism :  0 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-16 15:59:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . parallelism  should  be  >=  1. 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  The  number  of  parallel  processed  modules  in  the  compilation . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"repeated value" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  [ "abc" ,  "def" ,  "abc" ] 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-16 15:59:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . entry  should  not  contain  the  item  'abc'  twice . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  All  modules  are  loaded  upon  startup .  The  last  one  is  exported . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"multiple errors" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  [ /a/ ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											output :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												filename :  /a/ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-19 06:54:35 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . entry [ 0 ]  should  be  a  non - empty  string . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  A  module  that  is  loaded  upon  startup .  Only  the  last  one  is  exported . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . output . filename  should  be  one  of  these : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   non - empty  string  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Specifies  the  filename  template  of  output  files  on  disk .  You  must  * * not * *  specify  an  absolute  path  here ,  but  the  path  may  contain  folders  separated  by  '/' !  The  specified  path  is  joined  with  the  value  of  the  'output.path'  option  to  determine  the  location  on  disk . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . output . filename  should  be  a  non - empty  string . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . output . filename  should  be  an  instance  of  function . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"multiple configurations" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										[ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												entry :  [ /a/ ] 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												entry :  "a" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												output :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													filename :  /a/ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration [ 0 ] . entry [ 0 ]  should  be  a  non - empty  string . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  A  module  that  is  loaded  upon  startup .  Only  the  last  one  is  exported . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration [ 1 ] . output . filename  should  be  one  of  these : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   non - empty  string  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-05 18:11:02 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Specifies  the  filename  template  of  output  files  on  disk .  You  must  * * not * *  specify  an  absolute  path  here ,  but  the  path  may  contain  folders  separated  by  '/' !  The  specified  path  is  joined  with  the  value  of  the  'output.path'  option  to  determine  the  location  on  disk . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration [ 1 ] . output . filename  should  be  a  non - empty  string . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration [ 1 ] . output . filename  should  be  an  instance  of  function . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"deep error" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											module :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												rules :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														oneOf :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
															{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																test :  "/a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																passer :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
																	amd :  false 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
																} 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
															} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														] 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . module . rules [ 0 ] . oneOf [ 0 ]  has  an  unknown  property  'passer' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-11 01:54:22 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  assert ? ,  compiler ? ,  dependency ? ,  descriptionData ? ,  enforce ? ,  exclude ? ,  generator ? ,  include ? ,  issuer ? ,  issuerLayer ? ,  layer ? ,  loader ? ,  mimetype ? ,  oneOf ? ,  options ? ,  parser ? ,  realResource ? ,  resolve ? ,  resource ? ,  resourceFragment ? ,  resourceQuery ? ,  rules ? ,  scheme ? ,  sideEffects ? ,  test ? ,  type ? ,  use ? ,  with ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  A  rule  description  with  conditions  and  effects  for  modules . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"additional key on root" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											postcss :  ( )  =>  { } 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-21 02:18:52 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration  has  an  unknown  property  'postcss' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   For  typos :  please  correct  them . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   For  loader  options :  webpack  >=  v2 . 0.0  no  longer  allows  custom  properties  in  configuration . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     Loaders  should  be  updated  to  allow  passing  options  via  loader  options  in  module . rules . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     Until  loaders  are  updated  one  can  use  the  LoaderOptionsPlugin  to  pass  these  options  to  the  loader : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     plugins :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											       new  webpack . LoaderOptionsPlugin ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											         // test: /\\\\.xxx$/, // may apply this only for some modules
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											         options :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											           postcss :  … 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											         } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											       } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     ] " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"enum" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "a" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											devtool :  true 
							 
						 
					
						
							
								
									
										
										
										
											2016-12-14 19:03:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . devtool  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-18 20:58:50 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   false  |  \ \ "eval\\"  |  string  ( should  match  pattern  \ \ "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\\" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  A  developer  tool  to  enhance  debugging  ( false  |  eval  |  [ inline - | hidden - | eval - ] [ nosources - ] [ cheap - [ module - ] ] source - map ) . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . devtool  should  be  one  of  these : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      false  |  \ \ "eval\\" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . devtool  should  be  a  string  ( should  match  pattern  \ \ "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\\" ) . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"! in path" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-15 16:24:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											output :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												path :  "/somepath/!test" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												filename :  "bar" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-15 16:24:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . output . path :  The  provided  value  \ \ "/somepath/!test\\"  contains  exclamation  mark  ( ! )  which  is  not  allowed  because  it ' s  reserved  for  loader  syntax . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  The  output  directory  as  * * absolute  path * *  ( required ) . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"relative path" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											output :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												filename :  "/bar" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-03 21:49:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . output . filename :  A  relative  path  is  expected .  However ,  the  provided  value  \ \ "/bar\\"  is  an  absolute  path ! 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Please  use  output . path  to  specify  absolute  path  and  output . filename  for  the  file  name . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"absolute path" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											output :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												filename :  "bar" 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-03 21:49:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											context :  "baz" 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-03 21:49:38 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . context :  The  provided  value  \ \ "baz\\"  is  not  an  absolute  path ! 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  The  base  directory  ( absolute  path ! )  for  resolving  the  \ ` entry \`  option. If  \` output.pathinfo \`  is set, the included pathinfo is shortened to this directory."
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"missing stats option" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											stats :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												foobar :  true 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-14 06:12:24 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												msg 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													. replace ( /object \{ .* \}/g ,  "object {...}" ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													. replace ( /"none" \| .+/g ,  '"none" | ...' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . stats  has  an  unknown  property  'foobar' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  { ... } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Stats  options  object . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` );
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"Invalid plugin provided: bool" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											plugins :  [ true ] 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-25 00:54:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   false  |  0  |  \ \ "\\"  |  null  |  undefined  |  object  {  apply ,  …  }  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Plugin  of  type  object  or  instanceof  Function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      false  |  0  |  \ \ "\\"  |  null  |  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      - >  These  values  will  be  ignored  by  webpack  and  created  to  be  used  with  '&&'  or  '||'  to  improve  readability  of  configurations . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  object : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      object  {  apply ,  …  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Plugin  instance . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  instance  of  function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Function  acting  as  plugin . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"Invalid plugin provided: array" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											plugins :  [ [ ] ] 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-25 00:54:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   false  |  0  |  \ \ "\\"  |  null  |  undefined  |  object  {  apply ,  …  }  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Plugin  of  type  object  or  instanceof  Function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      false  |  0  |  \ \ "\\"  |  null  |  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      - >  These  values  will  be  ignored  by  webpack  and  created  to  be  used  with  '&&'  or  '||'  to  improve  readability  of  configurations . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  object : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      object  {  apply ,  …  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Plugin  instance . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  instance  of  function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Function  acting  as  plugin . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"Invalid plugin provided: string" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											plugins :  [ "abc123" ] 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-25 00:54:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   false  |  0  |  \ \ "\\"  |  null  |  undefined  |  object  {  apply ,  …  }  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Plugin  of  type  object  or  instanceof  Function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      false  |  0  |  \ \ "\\"  |  null  |  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      - >  These  values  will  be  ignored  by  webpack  and  created  to  be  used  with  '&&'  or  '||'  to  improve  readability  of  configurations . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  object : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      object  {  apply ,  …  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Plugin  instance . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  instance  of  function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Function  acting  as  plugin . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"Invalid plugin provided: int" , 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-25 18:46:17 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											plugins :  [ 12 ] 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-25 00:54:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   false  |  0  |  \ \ "\\"  |  null  |  undefined  |  object  {  apply ,  …  }  |  function 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Plugin  of  type  object  or  instanceof  Function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Details : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  one  of  these : 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 07:54:32 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      false  |  0  |  \ \ "\\"  |  null  |  undefined 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-07 09:48:55 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											      - >  These  values  will  be  ignored  by  webpack  and  created  to  be  used  with  '&&'  or  '||'  to  improve  readability  of  configurations . 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  object : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      object  {  apply ,  …  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Plugin  instance . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											    *  configuration . plugins [ 0 ]  should  be  an  instance  of  function . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											      - >  Function  acting  as  plugin . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-03 06:28:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"Invalid plugin provided: object without apply function" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											entry :  "foo.js" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											plugins :  [ { } ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . plugins [ 0 ]  misses  the  property  'apply' .  Should  be : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   function 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  The  run  point  of  the  plugin ,  required  method . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-11-03 06:28:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-13 05:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									// cspell:Ignore protuction
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:37 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"invalid mode" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											mode :  "protuction" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . mode  should  be  one  of  these : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   \ \ "development\\"  |  \ \ "production\\"  |  \ \ "none\\" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  Enable  production  optimizations  or  development  hints . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"debug" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											debug :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration  has  an  unknown  property  'debug' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   The  'debug'  property  was  removed  in  webpack  2.0 . 0. 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Loaders  should  be  updated  to  allow  passing  this  option  via  loader  options  in  module . rules . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Until  loaders  are  updated  one  can  use  the  LoaderOptionsPlugin  to  switch  loaders  into  debug  mode : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   plugins :  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     new  webpack . LoaderOptionsPlugin ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											       debug :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   ] " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-20 00:55:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-24 23:17:26 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"missing cache group name" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											optimization :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												splitChunks :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													cacheGroups :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														test :  /abc/ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-10 21:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . optimization . splitChunks . cacheGroups  should  not  be  object  {  test ,  …  } . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  Using  the  cacheGroup  shorthand  syntax  with  a  cache  group  named  'test'  is  a  potential  config  error 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  intent  to  define  a  cache  group  with  a  test  instead ? 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   cacheGroups :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     < name > :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											       test :  ... 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											     } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   } . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   object  {  < key > :  false  |  RegExp  |  string  |  function  |  object  {  automaticNameDelimiter ? ,  chunks ? ,  enforce ? ,  enforceSizeThreshold ? ,  filename ? ,  idHint ? ,  layer ? ,  maxAsyncRequests ? ,  maxAsyncSize ? ,  maxInitialRequests ? ,  maxInitialSize ? ,  maxSize ? ,  minChunks ? ,  minRemainingSize ? ,  minSize ? ,  minSizeReduction ? ,  name ? ,  priority ? ,  reuseExistingChunk ? ,  test ? ,  type ? ,  usedExports ?  }  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  Assign  modules  to  a  cache  group  ( modules  from  different  cache  groups  are  tried  to  keep  in  separate  chunks ,  default  categories :  'default' ,  'defaultVendors' ) . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-20 00:55:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"holey array" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										// eslint-disable-next-line no-sparse-arrays
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-20 01:48:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										[ {  mode :  "production"  } ,  ,  {  mode :  "development"  } ] , 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-20 00:55:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration [ 1 ]  should  be  an  object : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 21:14:44 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-07 21:55:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-21 16:38:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-11 04:01:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"ecmaVersion" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 22:37:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											output :  {  ecmaVersion :  2015  } 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-11 04:01:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 22:37:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . output  has  an  unknown  property  'ecmaVersion' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2024-03-06 14:44:41 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amdContainer ? ,  assetModuleFilename ? ,  asyncChunks ? ,  auxiliaryComment ? ,  charset ? ,  chunkFilename ? ,  chunkFormat ? ,  chunkLoadTimeout ? ,  chunkLoading ? ,  chunkLoadingGlobal ? ,  clean ? ,  compareBeforeEmit ? ,  crossOriginLoading ? ,  cssChunkFilename ? ,  cssFilename ? ,  cssHeadDataCompression ? ,  devtoolFallbackModuleFilenameTemplate ? ,  devtoolModuleFilenameTemplate ? ,  devtoolNamespace ? ,  enabledChunkLoadingTypes ? ,  enabledLibraryTypes ? ,  enabledWasmLoadingTypes ? ,  environment ? ,  filename ? ,  globalObject ? ,  hashDigest ? ,  hashDigestLength ? ,  hashFunction ? ,  hashSalt ? ,  hotUpdateChunkFilename ? ,  hotUpdateGlobal ? ,  hotUpdateMainFilename ? ,  ignoreBrowserWarnings ? ,  iife ? ,  importFunctionName ? ,  importMetaName ? ,  library ? ,  libraryExport ? ,  libraryTarget ? ,  module ? ,  path ? ,  pathinfo ? ,  publicPath ? ,  scriptType ? ,  sourceMapFilename ? ,  sourcePrefix ? ,  strictModuleErrorHandling ? ,  strictModuleExceptionHandling ? ,  trustedTypes ? ,  umdNamedDefine ? ,  uniqueName ? ,  wasmLoading ? ,  webassemblyModuleFilename ? ,  workerChunkLoading ? ,  workerPublicPath ? ,  workerWasmLoading ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 22:37:53 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  affecting  the  output  of  the  compilation .  \ ` output \`  options tell webpack how to write the compiled files to disk.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-22 03:59:33 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   Did  you  mean  output . environment  ( output . ecmaVersion  was  a  temporary  configuration  option  during  webpack  5  beta ) ? " 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-11 04:01:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 19:54:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"devtool sourcemap" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											devtool :  "sourcemap" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . devtool  should  match  pattern  \ \ "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\\" . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   BREAKING  CHANGE  since  webpack  5 :  The  devtool  option  is  more  strict . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Please  strictly  follow  the  order  of  the  keywords  in  the  pattern . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 19:54:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"devtool source-maps" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											devtool :  "source-maps" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-18 01:29:58 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											 -  configuration . devtool  should  match  pattern  \ \ "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\\" . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   BREAKING  CHANGE  since  webpack  5 :  The  devtool  option  is  more  strict . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Please  strictly  follow  the  order  of  the  keywords  in  the  pattern . " 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 19:54:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"invalid watch options" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											watchOptions :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . watchOptions  should  be  an  object : 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-21 20:33:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  aggregateTimeout ? ,  followSymlinks ? ,  ignored ? ,  poll ? ,  stdin ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  for  the  watcher . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-17 17:27:46 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"devtool" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											devtool :  "cheap-eval-nosource-source-map" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . devtool  should  match  pattern  \ \ "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$\\" . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   BREAKING  CHANGE  since  webpack  5 :  The  devtool  option  is  more  strict . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Please  strictly  follow  the  order  of  the  keywords  in  the  pattern . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									describe ( "did you mean" ,  ( )  =>  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"module.rules" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												rules :  [ ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration  has  an  unknown  property  'rules' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  module . rules ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"optimization.splitChunks" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												splitChunks :  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration  has  an  unknown  property  'splitChunks' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  optimization . splitChunks ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"module.noParse" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												noParse :  /a/ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration  has  an  unknown  property  'noParse' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-02 12:05:48 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  amd ? ,  bail ? ,  cache ? ,  context ? ,  dependencies ? ,  devServer ? ,  devtool ? ,  entry ? ,  experiments ? ,  extends ? ,  externals ? ,  externalsPresets ? ,  externalsType ? ,  ignoreWarnings ? ,  infrastructureLogging ? ,  loader ? ,  mode ? ,  module ? ,  name ? ,  node ? ,  optimization ? ,  output ? ,  parallelism ? ,  performance ? ,  plugins ? ,  profile ? ,  recordsInputPath ? ,  recordsOutputPath ? ,  recordsPath ? ,  resolve ? ,  resolveLoader ? ,  snapshot ? ,  stats ? ,  target ? ,  watch ? ,  watchOptions ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Options  object  as  provided  by  the  user . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  module . noParse ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
									
										
										
										
											2021-12-13 05:57:14 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											"optimization.moduleIds" , 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												optimization :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													hashedModuleIds :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . optimization  has  an  unknown  property  'hashedModuleIds' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-12 02:34:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  checkWasmTypes ? ,  chunkIds ? ,  concatenateModules ? ,  emitOnErrors ? ,  entryIife ? ,  flagIncludedChunks ? ,  innerGraph ? ,  mangleExports ? ,  mangleWasmImports ? ,  mergeDuplicateChunks ? ,  minimize ? ,  minimizer ? ,  moduleIds ? ,  noEmitOnErrors ? ,  nodeEnv ? ,  portableRecords ? ,  providedExports ? ,  realContentHash ? ,  removeAvailableModules ? ,  removeEmptyChunks ? ,  runtimeChunk ? ,  sideEffects ? ,  splitChunks ? ,  usedExports ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Enables / Disables  integrated  optimizations . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  optimization . moduleIds :  \ \ "hashed\\"  ( BREAKING  CHANGE  since  webpack  5 ) ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"optimization.chunkIds" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												optimization :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													namedChunks :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . optimization  has  an  unknown  property  'namedChunks' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-12 02:34:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  checkWasmTypes ? ,  chunkIds ? ,  concatenateModules ? ,  emitOnErrors ? ,  entryIife ? ,  flagIncludedChunks ? ,  innerGraph ? ,  mangleExports ? ,  mangleWasmImports ? ,  mergeDuplicateChunks ? ,  minimize ? ,  minimizer ? ,  moduleIds ? ,  noEmitOnErrors ? ,  nodeEnv ? ,  portableRecords ? ,  providedExports ? ,  realContentHash ? ,  removeAvailableModules ? ,  removeEmptyChunks ? ,  runtimeChunk ? ,  sideEffects ? ,  splitChunks ? ,  usedExports ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Enables / Disables  integrated  optimizations . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  optimization . chunkIds :  \ \ "named\\"  ( BREAKING  CHANGE  since  webpack  5 ) ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"optimization.chunk/moduleIds" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												optimization :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													occurrenceOrder :  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . optimization  has  an  unknown  property  'occurrenceOrder' .  These  properties  are  valid : 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-12 02:34:04 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   object  {  checkWasmTypes ? ,  chunkIds ? ,  concatenateModules ? ,  emitOnErrors ? ,  entryIife ? ,  flagIncludedChunks ? ,  innerGraph ? ,  mangleExports ? ,  mangleWasmImports ? ,  mergeDuplicateChunks ? ,  minimize ? ,  minimizer ? ,  moduleIds ? ,  noEmitOnErrors ? ,  nodeEnv ? ,  portableRecords ? ,  providedExports ? ,  realContentHash ? ,  removeAvailableModules ? ,  removeEmptyChunks ? ,  runtimeChunk ? ,  sideEffects ? ,  splitChunks ? ,  usedExports ?  } 
							 
						 
					
						
							
								
									
										
										
										
											2020-07-06 23:38:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											   - >  Enables / Disables  integrated  optimizations . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   Did  you  mean  optimization . chunkIds :  \ \ "size\\"  and  optimization . moduleIds :  \ \ "size\\"  ( BREAKING  CHANGE  since  webpack  5 ) ? " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										createTestCase ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"optimization.idHint" , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												optimization :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													splitChunks :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														automaticNamePrefix :  "vendor" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											msg  => 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												expect ( msg ) . toMatchInlineSnapshot ( ` 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-10 21:23:03 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											" Invalid  configuration  object .  Webpack  has  been  initialized  using  a  configuration  object  that  does  not  match  the  API  schema . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											 -  configuration . optimization . splitChunks  has  an  unknown  property  'automaticNamePrefix' .  These  properties  are  valid : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   object  {  automaticNameDelimiter ? ,  cacheGroups ? ,  chunks ? ,  defaultSizeTypes ? ,  enforceSizeThreshold ? ,  fallbackCacheGroup ? ,  filename ? ,  hidePathInfo ? ,  maxAsyncRequests ? ,  maxAsyncSize ? ,  maxInitialRequests ? ,  maxInitialSize ? ,  maxSize ? ,  minChunks ? ,  minRemainingSize ? ,  minSize ? ,  minSizeReduction ? ,  name ? ,  usedExports ?  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											   - >  Options  object  for  splitting  chunks  into  smaller  chunks . " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										` )
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-18 03:39:40 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-19 06:54:35 +08:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ) ;