Skip to content

Commit a9162b0

Browse files
authored
docs: fix webpack repo links that use legacy branch name (#7036)
The new default branch name of webpack repository is `main`, and the links in the docs still use the legacy branch name `master`.
1 parent 2bf7b01 commit a9162b0

File tree

13 files changed

+22
-22
lines changed

13 files changed

+22
-22
lines changed

src/content/api/loaders.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ In [the example](#example-for-the-loader-context): in loader1: `0`, in loader2:
471471
loadModule(request: string, callback: function(err, source, sourceMap, module))
472472
```
473473

474-
Resolves the given request to a module, applies all configured loaders and calls back with the generated source, the sourceMap and the module instance (usually an instance of [`NormalModule`](https://github.com/webpack/webpack/blob/master/lib/NormalModule.js)). Use this function if you need to know the source code of another module to generate the result.
474+
Resolves the given request to a module, applies all configured loaders and calls back with the generated source, the sourceMap and the module instance (usually an instance of [`NormalModule`](https://github.com/webpack/webpack/blob/main/lib/NormalModule.js)). Use this function if you need to know the source code of another module to generate the result.
475475

476476
`this.loadModule` in a loader context uses CommonJS resolve rules by default. Use `this.getResolve` with an appropriate `dependencyType`, e.g. `'esm'`, `'commonjs'` or a custom one before using a different semantic.
477477

src/content/api/node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ registered plugins.
7676

7777
The `hooks` property on a `Compiler` instance is used to register a plugin to
7878
any hook event in the `Compiler`'s lifecycle. The
79-
[`WebpackOptionsDefaulter`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsDefaulter.js)
80-
and [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js)
79+
[`WebpackOptionsDefaulter`](https://github.com/webpack/webpack/blob/main/lib/WebpackOptionsDefaulter.js)
80+
and [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/main/lib/WebpackOptionsApply.js)
8181
utilities are used by webpack to configure its `Compiler` instance with all the
8282
built-in plugins.
8383

src/content/configuration/module.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ Example for an `expr` dynamic dependency: `require(expr)`.
13871387

13881388
Example for an `wrapped` dynamic dependency: `require('./templates/' + expr)`.
13891389

1390-
Here are the available options with their [defaults](https://github.com/webpack/webpack/blob/master/lib/config/defaults.js):
1390+
Here are the available options with their [defaults](https://github.com/webpack/webpack/blob/main/lib/config/defaults.js):
13911391

13921392
**webpack.config.js**
13931393

src/content/configuration/node.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ contributors:
1414

1515
The following Node.js options configure whether to polyfill or mock certain [Node.js globals](https://nodejs.org/docs/latest/api/globals.html).
1616

17-
This feature is provided by webpack's internal [`NodeStuffPlugin`](https://github.com/webpack/webpack/blob/master/lib/NodeStuffPlugin.js) plugin.
17+
This feature is provided by webpack's internal [`NodeStuffPlugin`](https://github.com/webpack/webpack/blob/main/lib/NodeStuffPlugin.js) plugin.
1818

1919
W> As of webpack 5, You can configure only `global`, `__filename` or `__dirname` under `node` option. If you're looking for how to polyfill `fs` alike in Node.js under webpack 5, please check [resolve.fallback](/configuration/resolve/#resolvefallback) for help.
2020

src/content/configuration/optimization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ module.exports = {
513513

514514
`boolean = true` `string: 'flag'`
515515

516-
Tells webpack to recognise the [`sideEffects`](https://github.com/webpack/webpack/blob/master/examples/side-effects/README.md) flag in `package.json` or rules to skip over modules which are flagged to contain no side effects when exports are not used.
516+
Tells webpack to recognise the [`sideEffects`](https://github.com/webpack/webpack/blob/main/examples/side-effects/README.md) flag in `package.json` or rules to skip over modules which are flagged to contain no side effects when exports are not used.
517517

518518
**package.json**
519519

src/content/configuration/stats.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ module.exports = {
741741

742742
`array = []: string | RegExp | function (assetName) => boolean` `string` `RegExp` `function (assetName) => boolean` `boolean: false`
743743

744-
Tells `stats` to exclude the matching modules information. This can be done with a `string`, a `RegExp`, a `function` that is getting the module's source as an argument and returns a `boolean`. `stats.excludeModules` can be an `array` of any of the above. `stats.excludeModules`'s configuration [is merged](https://github.com/webpack/webpack/blob/master/lib/Stats.js#L215) with the `stats.exclude`'s configuration value.
744+
Tells `stats` to exclude the matching modules information. This can be done with a `string`, a `RegExp`, a `function` that is getting the module's source as an argument and returns a `boolean`. `stats.excludeModules` can be an `array` of any of the above. `stats.excludeModules`'s configuration [is merged](https://github.com/webpack/webpack/blob/main/lib/Stats.js#L215) with the `stats.exclude`'s configuration value.
745745

746746
```javascript
747747
module.exports = {

src/content/configuration/target.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Defaults to `'browserslist'` or to `'web'` when no browserslist configuration wa
2626

2727
### string
2828

29-
The following string values are supported via [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js):
29+
The following string values are supported via [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/main/lib/WebpackOptionsApply.js):
3030

3131
| Option | Description |
3232
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

src/content/license.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ contributors:
88

99
## webpack
1010

11-
Webpack is [MIT licensed](https://github.com/webpack/webpack/blob/master/LICENSE).
11+
Webpack is [MIT licensed](https://github.com/webpack/webpack/blob/main/LICENSE).
1212

1313
## webpack logo and icon
1414

src/content/plugins/banner-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ contributors:
77
- chenxsan
88
related:
99
- title: banner-plugin-hashing test
10-
url: https://github.com/webpack/webpack/blob/master/test/configCases/plugins/banner-plugin-hashing/webpack.config.js
10+
url: https://github.com/webpack/webpack/blob/main/test/configCases/plugins/banner-plugin-hashing/webpack.config.js
1111
---
1212

1313
Adds a banner to the top of each generated chunk.

src/content/plugins/commons-chunk-plugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ new webpack.optimize.CommonsChunkPlugin({
174174
You also have the ability to pass the `minChunks` property a function. This function is called by the `CommonsChunkPlugin` and calls the function with `module` and `count` arguments.
175175

176176
The `module` argument represents each module in the chunks you have provided via the `name`/`names` property.
177-
`module` has the shape of a [NormalModule](https://github.com/webpack/webpack/blob/master/lib/NormalModule.js), which has two particularly useful properties for this use case:
177+
`module` has the shape of a [NormalModule](https://github.com/webpack/webpack/blob/main/lib/NormalModule.js), which has two particularly useful properties for this use case:
178178

179179
- `module.context`: The directory that stores the file. For example: `'/my_project/node_modules/example-dependency'`
180180
- `module.resource`: The name of the file being processed. For example: `'/my_project/node_modules/example-dependency/index.js'`

0 commit comments

Comments
 (0)