Skip to content

Commit 84e9fd0

Browse files
committed
docs(plugins): avoid code in heading
1 parent 46dfe4b commit 84e9fd0

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

src/content/plugins/dll-plugin.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ related:
1717

1818
The `DllPlugin` and `DllReferencePlugin` provide means to split bundles in a way that can drastically improve build time performance. The term "DLL" stands for Dynamic-link library which was originally introduced by Microsoft.
1919

20-
## `DllPlugin`
20+
## DllPlugin
2121

2222
This plugin is used in a separate webpack configuration exclusively to create a dll-only-bundle. It creates a `manifest.json` file, which is used by the [`DllReferencePlugin`](#dllreferenceplugin) to map dependencies.
2323

@@ -38,7 +38,7 @@ Creates a `manifest.json` which is written to the given `path`. It contains mapp
3838

3939
Combine this plugin with [`output.library`](/configuration/output/#outputlibrary) option to expose (aka, put into the global scope) the dll function.
4040

41-
## `DllReferencePlugin`
41+
## DllReferencePlugin
4242

4343
This plugin is used in the primary webpack config, it references the dll-only-bundle(s) to require pre-built dependencies.
4444

src/content/plugins/environment-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ new webpack.EnvironmentPlugin({
103103
});
104104
```
105105

106-
## `DotenvPlugin`
106+
## DotenvPlugin
107107

108108
The third-party [`DotenvPlugin`](https://github.com/mrsteele/dotenv-webpack) (`dotenv-webpack`) allows you to expose (a subset of) [dotenv variables](https://www.npmjs.com/package/dotenv):
109109

src/content/plugins/limit-chunk-count-plugin.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ new webpack.optimize.LimitChunkCountPlugin({
2222

2323
The following options are supported:
2424

25-
### `maxChunks`
25+
### maxChunks
2626

2727
`number`
2828

@@ -42,7 +42,7 @@ module.exports = {
4242
};
4343
```
4444

45-
### `minChunkSize`
45+
### minChunkSize
4646

4747
Keeping chunk size above the specified limit is no longer a feature of this plugin. Use [MinChunkSizePlugin](/plugins/min-chunk-size-plugin) instead.
4848

src/content/plugins/split-chunks-plugin.mdx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ webpack provides a set of options for developers that want more control over thi
5050

5151
W> The default configuration was chosen to fit web performance best practices, but the optimal strategy for your project might differ. If you're changing the configuration, you should measure the effect of your changes to ensure there's a real benefit.
5252

53-
## `optimization.splitChunks`
53+
## optimization.splitChunks
5454

5555
This configuration object represents the default behavior of the `SplitChunksPlugin`.
5656

@@ -89,13 +89,13 @@ W> When files paths are processed by webpack, they always contain `/` on Unix sy
8989

9090
W> Since webpack 5, passing an entry name to `{cacheGroup}.test` and using a name of an existing chunk for `{cacheGroup}.name` is no longer allowed.
9191

92-
### `splitChunks.automaticNameDelimiter`
92+
### splitChunks.automaticNameDelimiter
9393

9494
`string = '~'`
9595

9696
By default webpack will generate names using origin and name of the chunk (e.g. `vendors~main.js`). This option lets you specify the delimiter to use for the generated names.
9797

98-
### `splitChunks.chunks`
98+
### splitChunks.chunks
9999

100100
`string = 'async'` `function (chunk)`
101101

@@ -133,69 +133,69 @@ module.exports = {
133133

134134
T> You can combine this configuration with the [HtmlWebpackPlugin](/plugins/html-webpack-plugin/). It will inject all the generated vendor chunks for you.
135135

136-
### `splitChunks.maxAsyncRequests`
136+
### splitChunks.maxAsyncRequests
137137

138138
`number = 30`
139139

140140
Maximum number of parallel requests when on-demand loading.
141141

142-
### `splitChunks.maxInitialRequests`
142+
### splitChunks.maxInitialRequests
143143

144144
`number = 30`
145145

146146
Maximum number of parallel requests at an entry point.
147147

148-
### `splitChunks.defaultSizeTypes`
148+
### splitChunks.defaultSizeTypes
149149

150150
`[string] = ['javascript', 'unknown']`
151151

152152
Sets the size types which are used when a number is used for sizes.
153153

154-
### `splitChunks.minChunks`
154+
### splitChunks.minChunks
155155

156156
`number = 1`
157157

158158
The minimum times must a module be shared among chunks before splitting.
159159

160-
### `splitChunks.hidePathInfo`
160+
### splitChunks.hidePathInfo
161161

162162
`boolean`
163163

164164
Prevents exposing path info when creating names for parts splitted by maxSize.
165165

166-
### `splitChunks.minSize`
166+
### splitChunks.minSize
167167

168168
`number = 20000`
169169

170170
Minimum size, in bytes, for a chunk to be generated.
171171

172-
### `splitChunks.enforceSizeThreshold`
172+
### splitChunks.enforceSizeThreshold
173173

174-
#### `splitChunks.cacheGroups.{cacheGroup}.enforceSizeThreshold`
174+
#### splitChunks.cacheGroups.{cacheGroup}.enforceSizeThreshold
175175

176176
`number = 50000`
177177

178178
Size threshold at which splitting is enforced and other restrictions (minRemainingSize, maxAsyncRequests, maxInitialRequests) are ignored.
179179

180-
### `splitChunks.minRemainingSize`
180+
### splitChunks.minRemainingSize
181181

182-
#### `splitChunks.cacheGroups.{cacheGroup}.minRemainingSize`
182+
#### splitChunks.cacheGroups.{cacheGroup}.minRemainingSize
183183

184184
`number = 0`
185185

186186
`splitChunks.minRemainingSize` option was introduced in webpack 5 to avoid zero sized modules by ensuring that the minimum size of the chunk which remains after splitting is above a limit. Defaults to `0` in ['development' mode](/configuration/mode/#mode-development). For other cases `splitChunks.minRemainingSize` defaults to the value of `splitChunks.minSize` so it doesn't need to be specified manually except for the rare cases where deep control is required.
187187

188188
W> `splitChunks.minRemainingSize` only takes effect when a single chunk is remaining.
189189

190-
### `splitChunks.layer`
190+
### splitChunks.layer
191191

192-
#### `splitChunks.cacheGroups.{cacheGroup}.layer`
192+
#### splitChunks.cacheGroups.{cacheGroup}.layer
193193

194194
`RegExp` `string` `function`
195195

196196
Assign modules to a cache group by module layer.
197197

198-
### `splitChunks.maxSize`
198+
### splitChunks.maxSize
199199

200200
`number = 0`
201201

@@ -210,23 +210,23 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac
210210

211211
T> Setting the value for `maxSize` sets the value for both `maxAsyncSize` and `maxInitialSize`.
212212

213-
### `splitChunks.maxAsyncSize`
213+
### splitChunks.maxAsyncSize
214214

215215
`number`
216216

217217
Like `maxSize`, `maxAsyncSize` can be applied globally (`splitChunks.maxAsyncSize`), to cacheGroups (`splitChunks.cacheGroups.{cacheGroup}.maxAsyncSize`), or to the fallback cache group (`splitChunks.fallbackCacheGroup.maxAsyncSize`).
218218

219219
The difference between `maxAsyncSize` and `maxSize` is that `maxAsyncSize` will only affect on-demand loading chunks.
220220

221-
### `splitChunks.maxInitialSize`
221+
### splitChunks.maxInitialSize
222222

223223
`number`
224224

225225
Like `maxSize`, `maxInitialSize` can be applied globally (`splitChunks.maxInitialSize`), to cacheGroups (`splitChunks.cacheGroups.{cacheGroup}.maxInitialSize`), or to the fallback cache group (`splitChunks.fallbackCacheGroup.maxInitialSize`).
226226

227227
The difference between `maxInitialSize` and `maxSize` is that `maxInitialSize` will only affect initial load chunks.
228228

229-
### `splitChunks.name`
229+
### splitChunks.name
230230

231231
`boolean = false` `function (module, chunks, cacheGroupKey) => string` `string`
232232

@@ -279,16 +279,16 @@ Running webpack with following `splitChunks` configuration would also output a c
279279

280280
W> When assigning equal names to different split chunks, all vendor modules are placed into a single shared chunk, though it's not recommend since it can result in more code downloaded.
281281

282-
### `splitChunks.usedExports`
282+
### splitChunks.usedExports
283283

284-
#### `splitChunks.cacheGroups{cacheGroup}.usedExports`
284+
#### splitChunks.cacheGroups{cacheGroup}.usedExports
285285

286286
`boolean = true`
287287

288288
Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code.
289289
When it is `true`: analyse used exports for each runtime, when it is `"global"`: analyse exports globally for all runtimes combined).
290290

291-
### `splitChunks.cacheGroups`
291+
### splitChunks.cacheGroups
292292

293293
Cache groups can inherit and/or override any options from `splitChunks.*`; but `test`, `priority` and `reuseExistingChunk` can only be configured on cache group level. To disable any of the default cache groups, set them to `false`.
294294

@@ -307,13 +307,13 @@ module.exports = {
307307
};
308308
```
309309

310-
#### `splitChunks.cacheGroups.{cacheGroup}.priority`
310+
#### splitChunks.cacheGroups.{cacheGroup}.priority
311311

312312
`number = -20`
313313

314314
A module can belong to multiple cache groups. The optimization will prefer the cache group with a higher `priority`. The default groups have a negative priority to allow custom groups to take higher priority (default value is `0` for custom groups).
315315

316-
#### `splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk`
316+
#### splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk
317317

318318
`boolean = true`
319319

@@ -336,7 +336,7 @@ module.exports = {
336336
};
337337
```
338338

339-
#### `splitChunks.cacheGroups.{cacheGroup}.type`
339+
#### splitChunks.cacheGroups.{cacheGroup}.type
340340

341341
`function` `RegExp` `string`
342342

@@ -359,9 +359,9 @@ module.exports = {
359359
};
360360
```
361361

362-
#### `splitChunks.cacheGroups.test`
362+
#### splitChunks.cacheGroups.test
363363

364-
#### `splitChunks.cacheGroups.{cacheGroup}.test`
364+
#### splitChunks.cacheGroups.{cacheGroup}.test
365365

366366
`function (module, { chunkGraph, moduleGraph }) => boolean` `RegExp` `string`
367367

@@ -422,7 +422,7 @@ module.exports = {
422422
};
423423
```
424424

425-
#### `splitChunks.cacheGroups.{cacheGroup}.filename`
425+
#### splitChunks.cacheGroups.{cacheGroup}.filename
426426

427427
`string` `function (pathData, assetInfo) => string`
428428

@@ -489,7 +489,7 @@ module.exports = {
489489
};
490490
```
491491

492-
#### `splitChunks.cacheGroups.{cacheGroup}.enforce`
492+
#### splitChunks.cacheGroups.{cacheGroup}.enforce
493493

494494
`boolean = false`
495495

@@ -512,7 +512,7 @@ module.exports = {
512512
};
513513
```
514514

515-
#### `splitChunks.cacheGroups.{cacheGroup}.idHint`
515+
#### splitChunks.cacheGroups.{cacheGroup}.idHint
516516

517517
`string`
518518

0 commit comments

Comments
 (0)