File tree 8 files changed +39
-1
lines changed
module-trace-disabled-in-error
module-trace-enabled-in-error 8 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ class Stats {
95
95
const showProvidedExports = optionOrFallback ( options . providedExports , ! forToString ) ;
96
96
const showChildren = optionOrFallback ( options . children , true ) ;
97
97
const showSource = optionOrFallback ( options . source , ! forToString ) ;
98
+ const showModuleTrace = optionOrFallback ( options . moduleTrace , true ) ;
98
99
const showErrors = optionOrFallback ( options . errors , true ) ;
99
100
const showErrorDetails = optionOrFallback ( options . errorDetails , ! forToString ) ;
100
101
const showWarnings = optionOrFallback ( options . warnings , true ) ;
@@ -164,7 +165,7 @@ class Stats {
164
165
text += e . message ;
165
166
if ( showErrorDetails && e . details ) text += `\n${ e . details } ` ;
166
167
if ( showErrorDetails && e . missing ) text += e . missing . map ( item => `\n[${ item } ]` ) . join ( "" ) ;
167
- if ( e . dependencies && e . origin ) {
168
+ if ( showModuleTrace && e . dependencies && e . origin ) {
168
169
text += `\n @ ${ e . origin . readableIdentifier ( requestShortener ) } ` ;
169
170
e . dependencies . forEach ( dep => {
170
171
if ( ! dep . loc ) return ;
Original file line number Diff line number Diff line change 993
993
"type" : " string" ,
994
994
"description" : " sort the modules by that field"
995
995
},
996
+ "moduleTrace" : {
997
+ "type" : " boolean" ,
998
+ "description" : " add dependencies and origin of warnings/errors"
999
+ },
996
1000
"chunksSort" : {
997
1001
"type" : " string" ,
998
1002
"description" : " sort the chunks by that field"
Original file line number Diff line number Diff line change
1
+ Hash: 6e950f2e83663cb6e9a6
2
+ Time: Xms
3
+ Asset Size Chunks Chunk Names
4
+ main.js 2.81 kB 0 [emitted] main
5
+ chunk {0} main.js (main) 25 bytes [entry] [rendered]
6
+ [0] (webpack)/test/statsCases/module-trace-disabled-in-error/index.js 25 bytes {0} [built]
7
+
8
+ ERROR in (webpack)/test/statsCases/module-trace-disabled-in-error/index.js
9
+ Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-disabled-in-error'
Original file line number Diff line number Diff line change
1
+ require ( 'does-not-exist' )
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ entry : "./index" ,
3
+ stats : {
4
+ moduleTrace : false
5
+ }
6
+ } ;
Original file line number Diff line number Diff line change
1
+ Hash: 6e950f2e83663cb6e9a6
2
+ Time: Xms
3
+ Asset Size Chunks Chunk Names
4
+ main.js 2.81 kB 0 [emitted] main
5
+ chunk {0} main.js (main) 25 bytes [entry] [rendered]
6
+ [0] (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 25 bytes {0} [built]
7
+
8
+ ERROR in (webpack)/test/statsCases/module-trace-enabled-in-error/index.js
9
+ Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-enabled-in-error'
10
+ @ (webpack)/test/statsCases/module-trace-enabled-in-error/index.js 1:0-25
Original file line number Diff line number Diff line change
1
+ require ( 'does-not-exist' )
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ entry : "./index" ,
3
+ stats : {
4
+ moduleTrace : true
5
+ }
6
+ } ;
You can’t perform that action at this time.
0 commit comments