Skip to content

Commit bf58f4f

Browse files
committed
docs(cn): fix conflicts
1 parent 9aedec2 commit bf58f4f

File tree

8 files changed

+6
-144
lines changed

8 files changed

+6
-144
lines changed

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,8 @@
9999
"eslint-plugin-react": "^7.31.10",
100100
"eslint-plugin-react-hooks": "^4.6.0",
101101
"front-matter": "^4.0.2",
102-
<<<<<<< HEAD
103-
"github-slugger": "^1.4.0",
104-
"html-loader": "^2.1.2",
105-
=======
106102
"github-slugger": "^2.0.0",
107-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
103+
"html-loader": "^2.1.2",
108104
"html-webpack-plugin": "^5.5.0",
109105
"http-server": "^14.1.1",
110106
"husky": "^8.0.1",

src/content/api/module-variables.mdx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,9 @@ webpack 特定。[`module.hot`](#modulehot-webpack-specific) 的一个别名,[
132132
) => webpack.Context;
133133
```
134134
135-
<<<<<<< HEAD
136135
- 可用版本:5.70.0+
137136
- 示例:
138-
=======
139-
- Available: 5.70.0+
140-
- Example:
141137
142-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
143138
```js
144139
const contextRequire = import.meta.webpackContext('.', {
145140
recursive: false,
@@ -292,16 +287,10 @@ if (__webpack_is_included__('./module-a.js')) {
292287
293288
运行时修改 base 的 URI。
294289
295-
<<<<<<< HEAD
296290
- 类型:`string`
297291
- 可用:5.21.0+
298292
- 示例:
299-
=======
300-
- Type: `string`
301-
- Available: 5.21.0+
302-
- Example:
303293
304-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
305294
```js
306295
__webpack_base_uri__ = 'https://example.com';
307296
```

src/content/configuration/index.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ contributors:
1818
- bigdawggi
1919
- anshumanv
2020
- textbook
21-
<<<<<<< HEAD
21+
- coly010
22+
- chenxsan
2223
translators:
2324
- dear-lizhihua
2425
- QC-L
25-
=======
26-
- coly010
27-
- chenxsan
28-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
2926
---
3027

3128
webpack 开箱即用,可以无需使用任何配置文件。然而,webpack 会假定项目的入口起点为 `src/index.js`,然后会在 `dist/main.js` 输出结果,并且在生产环境开启压缩和优化。

src/content/configuration/module.mdx

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,10 @@ module.exports = {
147147

148148
为 CommonJS 启用 [魔法注释](/api/module-methods/#magic-comments)
149149

150-
<<<<<<< HEAD
151150
- 类型:`boolean`
152151
- 可用版本:5.17.0+
153152
- 示例:
154-
=======
155-
- Type: `boolean`
156-
- Available: 5.17.0+
157-
- Example:
158153

159-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
160154
```js
161155
module.exports = {
162156
module: {
@@ -179,16 +173,10 @@ const x = require(/* webpackIgnore: true */ 'x');
179173

180174
指定动态导入的全局模式。
181175

182-
<<<<<<< HEAD
183176
- 类型:`'eager' | 'weak' | 'lazy' | 'lazy-once'`
184177
- 可用版本:5.73.0+
185178
- 示例:
186-
=======
187-
- Type: `'eager' | 'weak' | 'lazy' | 'lazy-once'`
188-
- Available: 5.73.0+
189-
- Example:
190179

191-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
192180
```js
193181
module.exports = {
194182
module: {
@@ -205,16 +193,10 @@ const x = require(/* webpackIgnore: true */ 'x');
205193

206194
指定动态导入的全局 prefetch。
207195

208-
<<<<<<< HEAD
209196
- 类型:` number | boolean`
210197
- 可用版本:5.73.0+
211198
- 示例:
212-
=======
213-
- Type: ` number | boolean`
214-
- Available: 5.73.0+
215-
- Example:
216199

217-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
218200
```js
219201
module.exports = {
220202
module: {
@@ -231,16 +213,10 @@ const x = require(/* webpackIgnore: true */ 'x');
231213

232214
指定动态导入的全局 preload。
233215

234-
<<<<<<< HEAD
235216
- 类型:` number | boolean`
236217
- 可用版本:5.73.0+
237218
- 示例:
238-
=======
239-
- Type: ` number | boolean`
240-
- Available: 5.73.0+
241-
- Example:
242219

243-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
244220
```js
245221
module.exports = {
246222
module: {
@@ -257,16 +233,10 @@ const x = require(/* webpackIgnore: true */ 'x');
257233

258234
指出在 `\"import ... from ...\"``\"export ... from ...\"` 中无效导出名称的行为。
259235

260-
<<<<<<< HEAD
261236
- 类型:`'error' | 'warn' | 'auto' | false`
262237
- 可用版本:5.62.0+
263238
- 示例:
264-
=======
265-
- Type: `'error' | 'warn' | 'auto' | false`
266-
- Available: 5.62.0+
267-
- Example:
268239

269-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
270240
```js
271241
module.exports = {
272242
module: {
@@ -283,16 +253,10 @@ const x = require(/* webpackIgnore: true */ 'x');
283253

284254
指出在 `\"import ... from ...\"` 中无效导出名称的行为。
285255

286-
<<<<<<< HEAD
287256
- 类型:`'error' | 'warn' | 'auto' | false`
288257
- 可用版本:5.62.0+
289258
- 示例:
290-
=======
291-
- Type: `'error' | 'warn' | 'auto' | false`
292-
- Available: 5.62.0+
293-
- Example:
294259

295-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
296260
```js
297261
module.exports = {
298262
module: {
@@ -309,16 +273,10 @@ const x = require(/* webpackIgnore: true */ 'x');
309273

310274
Enable or disable evaluating `import.meta`.
311275

312-
<<<<<<< HEAD
313276
- 类型:`boolean = true`
314277
- 可用版本:5.68.0+
315278
- 示例:
316-
=======
317-
- Type: `boolean = true`
318-
- Available: 5.68.0+
319-
- Example:
320279

321-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
322280
```js
323281
module.exports = {
324282
module: {
@@ -335,16 +293,10 @@ Enable or disable evaluating `import.meta`.
335293

336294
启用/禁用 [`import.meta.webpackContext`](/api/module-variables/#importmetawebpackcontext) 分析。
337295

338-
<<<<<<< HEAD
339296
- 类型:`boolean`
340297
- 可用版本:5.70.0+
341298
- 示例:
342-
=======
343-
- Type: `boolean`
344-
- Available: 5.70.0+
345-
- Example:
346299

347-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
348300
```js
349301
module.exports = {
350302
module: {
@@ -361,16 +313,10 @@ Enable or disable evaluating `import.meta`.
361313

362314
指出在 `\"export ... from ...\"` 中无效导出名称的行为。当在 TypeScript 重新导出类型,从 `\"export ... from ...\"` 迁移到 `\"export type ... from ...\"` 时禁用该配置项是有用的。
363315

364-
<<<<<<< HEAD
365316
- 类型:`'error' | 'warn' | 'auto' | false`
366317
- 可用版本:5.62.0+
367318
- 示例:
368-
=======
369-
- Type: `'error' | 'warn' | 'auto' | false`
370-
- Available: 5.62.0+
371-
- Example:
372319

373-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
374320
```js
375321
module.exports = {
376322
module: {
@@ -387,14 +333,9 @@ Enable or disable evaluating `import.meta`.
387333

388334
启用 `new URL()` 语法解析。
389335

390-
<<<<<<< HEAD
391336
- 类型:`boolean = true` | `'relative'`
392337
- 示例:
393-
=======
394-
- Type: `boolean = true` | `'relative'`
395-
- Example:
396338

397-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
398339
```js
399340
module.exports = {
400341
module: {
@@ -717,7 +658,6 @@ module.exports = {
717658
{
718659
//...
719660
parser: {
720-
<<<<<<< HEAD
721661
amd: false, // 禁用 AMD
722662
commonjs: false, // 禁用 CommonJS
723663
system: false, // 禁用 SystemJS
@@ -728,33 +668,14 @@ module.exports = {
728668
browserify: false, // 禁用特殊处理的 browserify bundle
729669
requireJs: false, // 禁用 requirejs.*
730670
node: false, // 禁用 __dirname, __filename, module, require.extensions, require.main, 等。
731-
node: {...}, // 在模块级别(module level)上重新配置 [node](/configuration/node) 层(layer)
671+
commonjsMagicComments: false, // 禁用对 CommonJS 的 magic comments 支持
672+
node: {}, // 在模块级别(module level)上重新配置 node 层(layer)
732673
worker: ["default from web-worker", "..."] // 自定义 WebWorker 对 JavaScript 的处理,其中 "..." 为默认值。
733674
}
734675
}
735676
]
736677
}
737678
}
738-
=======
739-
amd: false, // disable AMD
740-
commonjs: false, // disable CommonJS
741-
system: false, // disable SystemJS
742-
harmony: false, // disable ES2015 Harmony import/export
743-
requireInclude: false, // disable require.include
744-
requireEnsure: false, // disable require.ensure
745-
requireContext: false, // disable require.context
746-
browserify: false, // disable special handling of Browserify bundles
747-
requireJs: false, // disable requirejs.*
748-
node: false, // disable __dirname, __filename, module, require.extensions, require.main, etc.
749-
commonjsMagicComments: false, // disable magic comments support for CommonJS
750-
node: {}, // reconfigure node layer on module level
751-
worker: ['default from web-worker', '...'], // Customize the WebWorker handling for javascript files, "..." refers to the defaults.
752-
},
753-
},
754-
],
755-
},
756-
};
757-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
758679
```
759680

760681
如果 `Rule.type` 的值为 `asset`,那么 `Rules.parser` 选项可能是一个对象或一个函数,其作用可能是将文件内容编码为 Base64,还可能是将其当做单独文件 emit 到输出目录。

src/content/configuration/output.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,8 @@ module.exports = {
914914

915915
指定库的名称。
916916

917-
<<<<<<< HEAD
918917
- 类型:
919-
=======
920-
- Type:
921918

922-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
923919
```ts
924920
string | string[] | {amd?: string, commonjs?: string, root?: string | string[]}
925921
```

src/content/configuration/watch.mdx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ contributors:
1111
- Neob91
1212
- Loonride
1313
- snitin315
14-
<<<<<<< HEAD
14+
- chenxsan
1515
translators:
1616
- lcxfs1991
1717
- QC-L
1818
- jacob-lcs
19-
=======
20-
- chenxsan
21-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
2219
---
2320

2421
Webpack 可以监听文件变化,当它们修改后会重新编译。这个页面介绍了如何启用这个功能,以及当 watch 无法正常运行的时候你可以做的一些调整。
@@ -175,14 +172,9 @@ T> 如果监听没生效,试试这个选项吧。这会对 VirtualBox、WSL、
175172

176173
当 stdin 流结束时停止监听。
177174

178-
<<<<<<< HEAD
179175
- 类型:`boolean`
180176
- 示例:
181-
=======
182-
- Type: `boolean`
183-
- Example:
184177

185-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
186178
```js
187179
module.exports = {
188180
//...

src/content/migrate/5.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,9 @@ node --trace-deprecation node_modules/webpack/bin/webpack.js
7171
- `optimization.splitChunks.cacheGroups.vendors``optimization.splitChunks.cacheGroups.defaultVendors`
7272
- `optimization.splitChunks.cacheGroups.test(module, chunks)``optimization.splitChunks.cacheGroups.test(module, { chunkGraph, moduleGraph })`
7373
- `Compilation.entries``Compilation.entryDependencies`
74-
<<<<<<< HEAD
7574
- `serve``serve` 已被移除,推荐使用 [`DevServer`](/configuration/dev-server/)
7675
- [`Rule.query`](/configuration/module/#ruleoptions--rulequery) (从 v3 开始被移除) → `Rule.options`/`UseEntry.options`
77-
=======
78-
- `serve` `serve` is removed in favor of [`DevServer`](/configuration/dev-server/)
79-
- [`Rule.query`](/configuration/module/#ruleoptions--rulequery) (deprecated since v3) `Rule.options`/`UseEntry.options`
8076
- `Rule.loaders`[`Rule.use`](/configuration/module/#ruleuse)
81-
>>>>>>> 1bc7704750b8b2b27a168a9afc1bf9f070745f0e
8277

8378
### 测试 webpack 5 兼容性 $#test-webpack-5-compatibility$
8479

0 commit comments

Comments
 (0)