Skip to content

Commit 60ae9f3

Browse files
committed
docs(en): merging all conflicts
2 parents 190c769 + 48a23c5 commit 60ae9f3

File tree

9 files changed

+1100
-1024
lines changed

9 files changed

+1100
-1024
lines changed

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"url": "https://github.com/webpack/webpack.js.org/issues"
2222
},
2323
"engines": {
24-
"node": ">=12"
24+
"node": ">=14"
2525
},
2626
"scripts": {
2727
"clean-dist": "rimraf ./dist",
@@ -73,31 +73,31 @@
7373
]
7474
},
7575
"devDependencies": {
76-
"@babel/core": "^7.18.5",
76+
"@babel/core": "^7.18.6",
7777
"@babel/eslint-parser": "^7.18.2",
7878
"@babel/plugin-proposal-class-properties": "^7.17.12",
79-
"@babel/preset-env": "^7.18.2",
80-
"@babel/preset-react": "^7.17.12",
79+
"@babel/preset-env": "^7.18.6",
80+
"@babel/preset-react": "^7.18.6",
8181
"@mdx-js/loader": "^2.0.0-next.9",
82-
"@octokit/auth-action": "^1.3.3",
83-
"@octokit/rest": "^18.12.0",
84-
"@parcel/css": "^1.10.1",
82+
"@octokit/auth-action": "^2.0.0",
83+
"@octokit/rest": "^19.0.3",
84+
"@parcel/css": "^1.11.2",
8585
"@pmmmwh/react-refresh-webpack-plugin": "next",
8686
"@svgr/webpack": "^6.2.1",
8787
"autoprefixer": "^10.4.7",
8888
"babel-loader": "^8.2.5",
8989
"copy-webpack-plugin": "^11.0.0",
9090
"css-loader": "^6.7.1",
9191
"css-minimizer-webpack-plugin": "^4.0.0",
92-
"cypress": "^10.2.0",
92+
"cypress": "^10.3.0",
9393
"directory-tree": "^3.3.0",
9494
"directory-tree-webpack-plugin": "^1.0.3",
9595
"duplexer": "^0.1.1",
96-
"eslint": "^8.18.0",
96+
"eslint": "^8.19.0",
9797
"eslint-config-prettier": "^8.5.0",
9898
"eslint-plugin-cypress": "^2.12.1",
99-
"eslint-plugin-mdx": "^2.0.0",
100-
"eslint-plugin-react": "^7.30.0",
99+
"eslint-plugin-mdx": "^2.0.1",
100+
"eslint-plugin-react": "^7.30.1",
101101
"eslint-plugin-react-hooks": "^4.6.0",
102102
"front-matter": "^4.0.2",
103103
"github-slugger": "^1.4.0",
@@ -106,19 +106,19 @@
106106
"http-server": "^14.1.1",
107107
"husky": "^8.0.1",
108108
"hyperlink": "^5.0.4",
109-
"jest": "^28.1.1",
110-
"lint-staged": "^13.0.2",
109+
"jest": "^28.1.2",
110+
"lint-staged": "^13.0.3",
111111
"lodash": "^4.17.21",
112112
"markdownlint": "^0.26.0",
113113
"markdownlint-cli": "^0.31.1",
114114
"mdast-util-to-string": "^3.1.0",
115115
"mini-css-extract-plugin": "^2.6.1",
116116
"mkdirp": "^1.0.4",
117117
"modularscale-sass": "^3.0.3",
118-
"node-fetch": "^3.2.6",
118+
"node-fetch": "^3.2.8",
119119
"npm-run-all": "^4.1.1",
120120
"postcss": "^8.4.14",
121-
"postcss-loader": "^7.0.0",
121+
"postcss-loader": "^7.0.1",
122122
"prettier": "^2.7.1",
123123
"react-refresh": "^0.14.0",
124124
"redirect-webpack-plugin": "^1.0.0",
@@ -132,20 +132,20 @@
132132
"remark-refractor": "montogeek/remark-refractor",
133133
"rimraf": "^3.0.2",
134134
"sass": "^1.53.0",
135-
"sass-loader": "^13.0.0",
135+
"sass-loader": "^13.0.2",
136136
"sirv-cli": "^2.0.2",
137137
"sitemap-static": "^0.4.2",
138138
"static-site-generator-webpack-plugin": "^3.4.1",
139139
"style-loader": "^3.3.1",
140-
"tailwindcss": "^3.1.4",
140+
"tailwindcss": "^3.1.6",
141141
"tap-spot": "^1.1.2",
142142
"textlint": "^11.8.2",
143143
"textlint-rule-heading": "^1.0.10",
144144
"unist-util-visit": "^4.1.0",
145145
"webpack": "^5.73.0",
146146
"webpack-bundle-analyzer": "^4.5.0",
147147
"webpack-cli": "^4.10.0",
148-
"webpack-dev-server": "^4.9.2",
148+
"webpack-dev-server": "^4.9.3",
149149
"webpack-merge": "^5.8.0",
150150
"workbox-webpack-plugin": "^6.5.3"
151151
},

src/components/Navigation/Navigation.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,13 @@ function Navigation({ links, pathname, hash = '', toggleSidebar }) {
212212
{link.children.map((child) => {
213213
const classNames =
214214
'text-blue-400 py-5 text-sm capitalize hover:text-black dark:hover:text-white';
215+
const isActive = location.pathname.startsWith(child.url);
215216
return (
216217
<NavLink
217218
key={child.url}
218219
to={child.url}
219220
title={child.title}
220-
className={({ isActive }) =>
221+
className={() =>
221222
isActive
222223
? `!text-black dark:!text-white ${classNames}`
223224
: classNames

src/content/api/module-methods.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,20 @@ const page = 'Foo';
435435
__webpack_modules__[require.resolveWeak(`./page/${page}`)];
436436
```
437437

438+
<<<<<<< HEAD
438439
T> `require.resolveWeak`_通用渲染_(服务器端渲染 SSR + 代码分割 Code Splitting)的基础。例如在 [react-universal-component](https://github.com/faceyspacey/react-universal-component) 等包中的用法。它允许代码在服务器端和客户端初始页面的加载上同步渲染。它要求手动或以某种方式提供 chunk。它可以在不需要指示应该被打包的情况下引入模块。它与 `import()` 一起使用,当用户导航触发额外的导入时,它会被接管。
440+
=======
441+
T> `require.resolveWeak` is the foundation of _universal rendering_ (SSR + Code Splitting), as used in packages such as [react-universal-component](https://github.com/faceyspacey/react-universal-component). It allows code to render synchronously on both the server and initial page-loads on the client. It requires that chunks are manually served or somehow available. It's able to require modules without indicating they should be bundled into a chunk. It's used in conjunction with `import()` which takes over when user navigation triggers additional imports.
442+
443+
### warning
444+
445+
If the module source contains a require that cannot be statically analyzed, critical dependencies warning is emitted.
446+
447+
Example code:
448+
449+
```javascript
450+
someFn(require);
451+
require.bind(null);
452+
require(variable);
453+
```
454+
>>>>>>> 48a23c513ad904dd811205b977407227c38264af

src/content/api/module-variables.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ __webpack_get_script_filename__ = (chunkId) => {
268268
269269
- 可以从嵌套的 exports 中得到相关信息: 例如 `__webpack_exports_info__.<exportName>.<exportName>.<exportName>.used`
270270
271+
- Check whether exports can be mangled with `__webpack_exports_info__.<name>.canMangle`
272+
271273
## \_\_webpack_is_included\_\_ (webpack-specific)
272274
273275
<Badge text="5.16.0+" />

src/content/awesome-webpack.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ _People passionate about Webpack (In no particular order)_
171171
- [Chrome Extension Archive Webpack Plugin](https://github.com/KeisukeYamashita/chrome-extension-archive-webpack-plugin) Create archive file to publish Chrome Exentions to Chrome Web Store -- _Maintainer_: `KeisukeYamashita` [![Github][githubicon]](https://github.com/KeisukeYamashita)
172172
- [Layer-pack Webpack Plugin](https://github.com/layer-pack/layer-pack) Allow to glob imports file & directories, build mono repo apps via inheritable source code / npm packages & share webpack configs -- _Maintainer_: `Braun Nathanaël` [![Github][githubicon]](https://github.com/N8tz)
173173
- [webpack-typescript-directory-compile-plugin](https://github.com/ssigwart/webpack-typescript-directory-compile-plugin) Configure an source directory of typescript files and an output directory for JavaScript files. Each typescript file in the source directory and any newly added files will be compiled to individual JavaScript files. -- _Maintainer_: `Stephen Sigwart` [![Github][githubicon]](https://github.com/ssigwart)
174+
- [CycloneDX Webpack Plugin](https://github.com/CycloneDX/cyclonedx-webpack-plugin#readme): Create CycloneDX Software Bill of Materials (SBOM) from webpack bundles at compile time. -- _Maintainer_: `OWASP CycloneDX Team` [![Github][githubicon]](https://github.com/CycloneDX)
174175

175176
### Webpack Tools
176177

src/content/concepts/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ T> 可以在 [这里](/concepts/modules) 了解更多关于 JavaScript 模块和
5656

5757
**入口起点(entry point)** 指示 webpack 应该使用哪个模块,来作为构建其内部 [依赖图(dependency graph)](/concepts/dependency-graph/) 的开始。进入入口起点后,webpack 会找出有哪些模块和库是入口起点(直接和间接)依赖的。
5858

59+
<<<<<<< HEAD
5960
默认值是 `./src/index.js`,但你可以通过在 [webpack configuration](/configuration) 中配置 `entry` 属性,来指定一个(或多个)不同的入口起点。例如:
61+
=======
62+
By default its value is `./src/index.js`, but you can specify a different (or multiple) entry points by setting an [`entry` property in the webpack configuration](/configuration/entry-context/#entry). For example:
63+
>>>>>>> 48a23c513ad904dd811205b977407227c38264af
6064

6165
**webpack.config.js**
6266

src/content/concepts/module-federation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export function set(value) {
259259
const publicPath = await import('remote/public-path');
260260
publicPath.set('/your-public-path');
261261

262-
//boostrap app e.g. import('./boostrap.js')
262+
//bootstrap app e.g. import('./bootstrap.js')
263263
```
264264

265265
### Infer publicPath from script $#inferpublicpathfromscript$

src/content/configuration/other-options.mdx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,18 +437,30 @@ module.exports = {
437437

438438
### immutablePaths $#immutable-paths$
439439

440-
`[string]`
440+
`(RegExp | string)[]`
441441

442442
由包管理器管理的路径数组,在其路径中包含一个版本或哈希,以便所有文件都是不可变的(immutable)。
443443

444+
<<<<<<< HEAD
444445
### managedPaths $#managedpaths$
446+
=======
447+
Make sure to wrap the path in a capture group if you use regular expressions.
445448

446-
`[string]`
449+
### managedPaths
450+
>>>>>>> 48a23c513ad904dd811205b977407227c38264af
451+
452+
`(RegExp | string)[]`
447453

448454
由包管理器管理的路径数组,可以信任它不会被修改。
449455

456+
<<<<<<< HEAD
450457

451458
### module $#module$
459+
=======
460+
Make sure to wrap the path in a capture group if you use regular expressions.
461+
462+
### module
463+
>>>>>>> 48a23c513ad904dd811205b977407227c38264af
452464

453465
`object = {hash boolean = true, timestamp boolean = true}`
454466

0 commit comments

Comments
 (0)