Skip to content

Commit f90fcc9

Browse files
committed
docs(en): merging all conflicts
2 parents 2cf3456 + 0462e9b commit f90fcc9

File tree

9 files changed

+358
-182
lines changed

9 files changed

+358
-182
lines changed

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,26 @@
7373
]
7474
},
7575
"devDependencies": {
76-
"@babel/core": "^7.16.12",
77-
"@babel/eslint-parser": "^7.16.5",
76+
"@babel/core": "^7.17.0",
77+
"@babel/eslint-parser": "^7.17.0",
7878
"@babel/plugin-proposal-class-properties": "^7.16.7",
7979
"@babel/preset-env": "^7.16.11",
8080
"@babel/preset-react": "^7.16.7",
8181
"@mdx-js/loader": "^2.0.0-next.9",
8282
"@octokit/auth-action": "^1.3.3",
8383
"@octokit/rest": "^18.12.0",
8484
"@pmmmwh/react-refresh-webpack-plugin": "next",
85-
"@svgr/webpack": "^6.2.0",
85+
"@svgr/webpack": "^6.2.1",
8686
"autoprefixer": "^10.4.2",
8787
"babel-loader": "^8.2.3",
88-
"copy-webpack-plugin": "^10.2.1",
89-
"css-loader": "^6.5.1",
88+
"copy-webpack-plugin": "^10.2.4",
89+
"css-loader": "^6.6.0",
9090
"css-minimizer-webpack-plugin": "^3.4.1",
91-
"cypress": "^9.3.1",
92-
"directory-tree": "^3.0.1",
91+
"cypress": "^9.4.1",
92+
"directory-tree": "^3.1.0",
9393
"directory-tree-webpack-plugin": "^1.0.3",
9494
"duplexer": "^0.1.1",
95-
"eslint": "^8.7.0",
95+
"eslint": "^8.8.0",
9696
"eslint-config-prettier": "^8.3.0",
9797
"eslint-plugin-cypress": "^2.12.1",
9898
"eslint-plugin-mdx": "^1.16.0",
@@ -106,7 +106,7 @@
106106
"husky": "^7.0.4",
107107
"hyperlink": "^5.0.4",
108108
"jest": "^27.4.7",
109-
"lint-staged": "^12.3.2",
109+
"lint-staged": "^12.3.3",
110110
"lodash": "^4.17.21",
111111
"markdownlint": "^0.25.1",
112112
"markdownlint-cli": "^0.30.0",
@@ -116,7 +116,7 @@
116116
"modularscale-sass": "^3.0.3",
117117
"node-fetch": "^3.2.0",
118118
"npm-run-all": "^4.1.1",
119-
"postcss": "^8.4.5",
119+
"postcss": "^8.4.6",
120120
"postcss-loader": "^6.2.1",
121121
"prettier": "^2.5.1",
122122
"react-refresh": "^0.11.0",
@@ -131,27 +131,27 @@
131131
"remark-refractor": "montogeek/remark-refractor",
132132
"remark-slug": "^7.0.1",
133133
"rimraf": "^3.0.2",
134-
"sass": "^1.49.0",
134+
"sass": "^1.49.7",
135135
"sass-loader": "^12.4.0",
136136
"sirv-cli": "^2.0.2",
137137
"sitemap-static": "^0.4.2",
138138
"start-server-and-test": "^1.14.0",
139139
"static-site-generator-webpack-plugin": "^3.4.1",
140140
"style-loader": "^3.3.1",
141-
"tailwindcss": "^3.0.17",
141+
"tailwindcss": "^3.0.18",
142142
"tap-spot": "^1.1.1",
143143
"textlint": "^11.8.2",
144144
"textlint-rule-heading": "^1.0.10",
145145
"unist-util-visit": "^4.1.0",
146-
"webpack": "^5.67.0",
146+
"webpack": "^5.68.0",
147147
"webpack-bundle-analyzer": "^4.5.0",
148148
"webpack-cli": "^4.9.2",
149-
"webpack-dev-server": "^4.7.3",
149+
"webpack-dev-server": "^4.7.4",
150150
"webpack-merge": "^5.8.0",
151151
"workbox-webpack-plugin": "^6.4.2"
152152
},
153153
"dependencies": {
154-
"@docsearch/react": "^3.0.0-alpha.42",
154+
"@docsearch/react": "^3.0.0-alpha.50",
155155
"path-browserify": "^1.0.1",
156156
"prop-types": "^15.8.1",
157157
"react": "^17.0.2",

src/content/api/module-variables.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ contributors:
1313
- anikethsaha
1414
- chenxsan
1515
- jamesgeorge007
16+
- snitin315
1617
related:
1718
- title: CommonJS
1819
url: https://en.wikipedia.org/wiki/CommonJS
@@ -168,7 +169,23 @@ import('./module-a').then((moduleA) => {
168169
});
169170
```
170171
172+
<<<<<<< HEAD
171173
## \_\_webpack_modules\_\_ (webpack-specific) $#__webpack_modules__-webpack-specific$
174+
=======
175+
## \_\_webpack_module\_\_ (webpack-specific)
176+
177+
<Badge text="5.68.0+" />
178+
179+
It provides access to the the current `module`. `module` is not available in strict ESM.
180+
181+
## \_\_webpack_module\_\_.id (webpack-specific)
182+
183+
<Badge text="5.68.0+" />
184+
185+
It provides access to the ID of current `module` (`module.id`). `module` is not available in strict ESM.
186+
187+
## \_\_webpack_modules\_\_ (webpack-specific)
188+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
172189
173190
访问所有模块的内部对象。
174191

src/content/concepts/index.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,13 @@ T> 查看 [插件接口(plugin interface)](/api/plugins),学习如何使用它
139139
**webpack.config.js**
140140

141141
```javascript
142+
<<<<<<< HEAD
142143
const HtmlWebpackPlugin = require('html-webpack-plugin'); // 通过 npm 安装
143144
const webpack = require('webpack'); // 用于访问内置插件
145+
=======
146+
const HtmlWebpackPlugin = require('html-webpack-plugin');
147+
const webpack = require('webpack'); //to access built-in plugins
148+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
144149

145150
module.exports = {
146151
module: {

src/content/concepts/loaders.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ module.exports = {
5353
- [配置方式](#configuration)(推荐):在 **webpack.config.js** 文件中指定 loader。
5454
- [内联方式](#inline):在每个 `import` 语句中显式指定 loader。
5555

56+
<<<<<<< HEAD
5657
### 配置方式 $#configuration$
58+
=======
59+
Note that loaders can be used from CLI under webpack v4, but the feature was deprecated in webpack v5.
60+
61+
### Configuration
62+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
5763

5864
[`module.rules`](/configuration/module/#modulerules) 允许你在 webpack 配置中指定多个 loader。
5965
这种方式是展示 loader 的一种简明方式,并且有助于使代码变得简洁和易于维护。同时让你对各个 loader 有个全局概览:

src/content/concepts/plugins.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ compiler hook 的 tap 方法的第一个参数,应该是驼峰式命名的插
5555
**webpack.config.js**
5656

5757
```javascript
58+
<<<<<<< HEAD
5859
const HtmlWebpackPlugin = require('html-webpack-plugin'); // 通过 npm 安装
5960
const webpack = require('webpack'); // 访问内置的插件
61+
=======
62+
const HtmlWebpackPlugin = require('html-webpack-plugin');
63+
const webpack = require('webpack'); //to access built-in plugins
64+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
6065
const path = require('path');
6166

6267
module.exports = {

src/content/configuration/dev-server.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ module.exports = {
11201120

11211121
## devServer.open $#devserveropen$
11221122

1123-
`boolean` `string` `[string]` `object` `[object]`
1123+
`boolean` `string` `object` `[string, object]`
11241124

11251125
告诉 dev-server 在服务器已经启动后打开浏览器。设置其为 `true` 以打开你的默认浏览器。
11261126

@@ -1615,7 +1615,7 @@ module.exports = {
16151615

16161616
## devServer.static $#devserverstatic$
16171617

1618-
`boolean` `string` `[string]` `object` `[object]`
1618+
`boolean` `string` `object` `[string, object]`
16191619

16201620
该配置项允许配置从目录提供静态文件的选项(默认是 'public' 文件夹)。将其设置为 `false` 以禁用:
16211621

@@ -1885,7 +1885,7 @@ module.exports = {
18851885

18861886
## devServer.watchFiles $#devserverwatchfiles$
18871887

1888-
`string` `[string]` `object` `[object]`
1888+
`string` `object` `[string, object]`
18891889

18901890
该配置项允许你配置 globs/directories/files 来监听文件变化。例如:
18911891

src/content/configuration/externals.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ translators:
2626

2727
## externals $#externals$
2828

29-
`string` `[string]` `object` `function` `RegExp`
29+
`string` `object` `function` `RegExp` `[string, object, function, RegExp]`
3030

3131
**防止**将某些 `import` 的包(package)**打包**到 bundle 中,而是在运行时(runtime)再去从外部获取这些*扩展依赖(external dependencies)*
3232

src/content/configuration/output.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,11 @@ module.exports = {
681681

682682
`string = 'hex'`
683683

684+
<<<<<<< HEAD
684685
在生成 hash 时使用的编码方式。支持 Node.js [`hash.digest`](https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding) 的所有编码。对文件名使用 `'base64'`,可能会出现问题,因为 base64 字母表中具有 `/` 这个字符(character)。同样的,`'latin1'` 规定可以含有任何字符(character)。
686+
=======
687+
The encoding to use when generating the hash. All encodings from Node.JS' [`hash.digest`](https://nodejs.org/api/buffer.html#buffers-and-character-encodings) are supported. Using `'base64'` for filenames might be problematic since it has the character `/` in its alphabet. Likewise `'latin1'` could contain any character.
688+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
685689
686690
## output.hashDigestLength $#outputhashdigestlength$
687691
@@ -970,7 +974,13 @@ MyLibrary = _entry_return_;
970974
971975
请注意,如果 `MyLibrary` 没有在你的库之前定义,那么它将会被设置在全局作用域。
972976
977+
<<<<<<< HEAD
973978
##### type: 'assign-properties' <Badge text='5.16.0+' /> $#typeassignproperties$
979+
=======
980+
##### type: 'assign-properties'
981+
982+
<Badge text="5.16.0+" />
983+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
974984
975985
```js
976986
module.exports = {
@@ -1151,7 +1161,7 @@ T> 在考虑 CommonJS 与 CommonJS2 之间的区别?虽然它们很相似,
11511161
11521162
##### type: 'commonjs-static' $#type-commonjsstatic$
11531163
1154-
<Badge text='5.66.0+' />
1164+
<Badge text="5.66.0+" />
11551165
11561166
```js
11571167
module.exports = {
@@ -1620,7 +1630,13 @@ MyLibrary = _entry_return_;
16201630
16211631
注意,如果 `MyLibrary` 在作用域中未在前面代码进行定义,则你的 library 将被设置在全局作用域内。
16221632
1633+
<<<<<<< HEAD
16231634
#### libraryTarget: 'assign-properties' <Badge text='5.16.0+' /> $#libraryTarget-assign-properties$
1635+
=======
1636+
#### libraryTarget: 'assign-properties'
1637+
1638+
<Badge text="5.16.0+" />
1639+
>>>>>>> 0462e9b4100e33f9d1fd6b1b8730bf51369a4ea4
16241640
16251641
W> 最好使用 [output.library.type: 'assign-properties'`](#type-assign-properties)。
16261642

0 commit comments

Comments
 (0)