@@ -16,6 +16,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
1616 this . set ( "context" , process . cwd ( ) ) ;
1717 this . set ( "target" , "web" ) ;
1818
19+ this . set ( "module" , "call" , value => Object . assign ( { } , value ) ) ;
1920 this . set ( "module.unknownContextRequest" , "." ) ;
2021 this . set ( "module.unknownContextRegExp" , false ) ;
2122 this . set ( "module.unknownContextRecursive" , true ) ;
@@ -29,7 +30,6 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
2930 this . set ( "module.wrappedContextCritical" , false ) ;
3031 this . set ( "module.strictExportPresence" , false ) ;
3132 this . set ( "module.strictThisContextOnImports" , false ) ;
32-
3333 this . set ( "module.unsafeCache" , true ) ;
3434
3535 this . set ( "output" , "call" , ( value , options ) => {
@@ -40,7 +40,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
4040 } else if ( typeof value !== "object" ) {
4141 return { } ;
4242 } else {
43- return value ;
43+ return Object . assign ( { } , value ) ;
4444 }
4545 } ) ;
4646 this . set ( "output.filename" , "[name].js" ) ;
@@ -68,7 +68,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
6868 this . set ( "output.devtoolLineToLine" , false ) ;
6969 this . set ( "output.strictModuleExceptionHandling" , false ) ;
7070
71- this . set ( "node" , { } ) ;
71+ this . set ( "node" , "call" , value => Object . assign ( { } , value ) ) ;
7272 this . set ( "node.console" , false ) ;
7373 this . set ( "node.process" , true ) ;
7474 this . set ( "node.global" , true ) ;
@@ -77,11 +77,12 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
7777 this . set ( "node.__filename" , "mock" ) ;
7878 this . set ( "node.__dirname" , "mock" ) ;
7979
80+ this . set ( "performance" , "call" , value => Object . assign ( { } , value ) ) ;
8081 this . set ( "performance.maxAssetSize" , 250000 ) ;
8182 this . set ( "performance.maxEntrypointSize" , 250000 ) ;
8283 this . set ( "performance.hints" , false ) ;
8384
84- this . set ( "resolve" , { } ) ;
85+ this . set ( "resolve" , "call" , value => Object . assign ( { } , value ) ) ;
8586 this . set ( "resolve.unsafeCache" , true ) ;
8687 this . set ( "resolve.modules" , [ "node_modules" ] ) ;
8788 this . set ( "resolve.extensions" , [ ".js" , ".json" ] ) ;
@@ -101,7 +102,8 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
101102 this . set ( "resolve.cacheWithContext" , "make" , ( options ) => {
102103 return Array . isArray ( options . resolve . plugins ) && options . resolve . plugins . length > 0 ;
103104 } ) ;
104- this . set ( "resolveLoader" , { } ) ;
105+
106+ this . set ( "resolveLoader" , "call" , value => Object . assign ( { } , value ) ) ;
105107 this . set ( "resolveLoader.unsafeCache" , true ) ;
106108 this . set ( "resolveLoader.mainFields" , [ "loader" , "main" ] ) ;
107109 this . set ( "resolveLoader.extensions" , [ ".js" , ".json" ] ) ;
0 commit comments