Skip to content

Commit 7339a8f

Browse files
renjithspacemontogeek
authored andcommitted
docs(configuration) Add space above comments (#1997)
For better readability. Most of the WebPack users are beginners. Using spaces above comments will increase readability and helps to catch it quickly.
1 parent 9814486 commit 7339a8f

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

src/content/configuration/stats.md

+36
Original file line numberDiff line numberDiff line change
@@ -37,86 +37,122 @@ For more granular control, it is possible to specify exactly what information yo
3737

3838
``` js
3939
stats: {
40+
4041
// fallback value for stats options when an option is not defined (has precedence over local webpack defaults)
4142
all: undefined,
43+
4244
// Add asset Information
4345
assets: true,
46+
4447
// Sort assets by a field
4548
// You can reverse the sort with `!field`.
4649
assetsSort: "field",
50+
4751
// Add build date and time information
4852
builtAt: true,
53+
4954
// Add information about cached (not built) modules
5055
cached: true,
56+
5157
// Show cached assets (setting this to `false` only shows emitted files)
5258
cachedAssets: true,
59+
5360
// Add children information
5461
children: true,
62+
5563
// Add chunk information (setting this to `false` allows for a less verbose output)
5664
chunks: true,
65+
5766
// Add built modules information to chunk information
5867
chunkModules: true,
68+
5969
// Add the origins of chunks and chunk merging info
6070
chunkOrigins: true,
71+
6172
// Sort the chunks by a field
6273
// You can reverse the sort with `!field`. Default is `id`.
6374
chunksSort: "field",
75+
6476
// Context directory for request shortening
6577
context: "../src/",
78+
6679
// `webpack --colors` equivalent
6780
colors: false,
81+
6882
// Display the distance from the entry point for each module
6983
depth: false,
84+
7085
// Display the entry points with the corresponding bundles
7186
entrypoints: false,
87+
7288
// Add --env information
7389
env: false,
90+
7491
// Add errors
7592
errors: true,
93+
7694
// Add details to errors (like resolving log)
7795
errorDetails: true,
96+
7897
// Exclude assets from being displayed in stats
7998
// This can be done with a String, a RegExp, a Function getting the assets name
8099
// and returning a boolean or an Array of the above.
81100
excludeAssets: "filter" | /filter/ | (assetName) => ... return true|false |
82101
["filter"] | [/filter/] | [(assetName) => ... return true|false],
102+
83103
// Exclude modules from being displayed in stats
84104
// This can be done with a String, a RegExp, a Function getting the modules source
85105
// and returning a boolean or an Array of the above.
86106
excludeModules: "filter" | /filter/ | (moduleSource) => ... return true|false |
87107
["filter"] | [/filter/] | [(moduleSource) => ... return true|false],
108+
88109
// See excludeModules
89110
exclude: "filter" | /filter/ | (moduleSource) => ... return true|false |
90111
["filter"] | [/filter/] | [(moduleSource) => ... return true|false],
112+
91113
// Add the hash of the compilation
92114
hash: true,
115+
93116
// Set the maximum number of modules to be shown
94117
maxModules: 15,
118+
95119
// Add built modules information
96120
modules: true,
121+
97122
// Sort the modules by a field
98123
// You can reverse the sort with `!field`. Default is `id`.
99124
modulesSort: "field",
125+
100126
// Show dependencies and origin of warnings/errors (since webpack 2.5.0)
101127
moduleTrace: true,
128+
102129
// Show performance hint when file size exceeds `performance.maxAssetSize`
103130
performance: true,
131+
104132
// Show the exports of the modules
105133
providedExports: false,
134+
106135
// Add public path information
107136
publicPath: true,
137+
108138
// Add information about the reasons why modules are included
109139
reasons: true,
140+
110141
// Add the source code of modules
111142
source: true,
143+
112144
// Add timing information
113145
timings: true,
146+
114147
// Show which exports of a module are used
115148
usedExports: false,
149+
116150
// Add webpack version information
117151
version: true,
152+
118153
// Add warnings
119154
warnings: true,
155+
120156
// Filter warnings to be shown (since webpack 2.4.0),
121157
// can be a String, Regexp, a function getting the warning and returning a boolean
122158
// or an Array of a combination of the above. First match wins.

0 commit comments

Comments
 (0)