File tree Expand file tree Collapse file tree 8 files changed +39
-1
lines changed
module-trace-disabled-in-error
module-trace-enabled-in-error Expand file tree Collapse file tree 8 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ class Stats {
9595 const showProvidedExports = optionOrFallback ( options . providedExports , ! forToString ) ;
9696 const showChildren = optionOrFallback ( options . children , true ) ;
9797 const showSource = optionOrFallback ( options . source , ! forToString ) ;
98+ const showModuleTrace = optionOrFallback ( options . moduleTrace , true ) ;
9899 const showErrors = optionOrFallback ( options . errors , true ) ;
99100 const showErrorDetails = optionOrFallback ( options . errorDetails , ! forToString ) ;
100101 const showWarnings = optionOrFallback ( options . warnings , true ) ;
@@ -164,7 +165,7 @@ class Stats {
164165 text += e . message ;
165166 if ( showErrorDetails && e . details ) text += `\n${ e . details } ` ;
166167 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 ) {
168169 text += `\n @ ${ e . origin . readableIdentifier ( requestShortener ) } ` ;
169170 e . dependencies . forEach ( dep => {
170171 if ( ! dep . loc ) return ;
Original file line number Diff line number Diff line change 993993 "type" : " string" ,
994994 "description" : " sort the modules by that field"
995995 },
996+ "moduleTrace" : {
997+ "type" : " boolean" ,
998+ "description" : " add dependencies and origin of warnings/errors"
999+ },
9961000 "chunksSort" : {
9971001 "type" : " string" ,
9981002 "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