Skip to content

docs(en): merge webpack.js.org/master into webpack.js.org/cn @ 3e476d47 #1598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.0.0",
"cypress": "^10.1.0",
"cypress": "^10.2.0",
"directory-tree": "^3.3.0",
"directory-tree-webpack-plugin": "^1.0.3",
"duplexer": "^0.1.1",
"eslint": "^8.17.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-mdx": "^1.17.0",
"eslint-plugin-mdx": "^2.0.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.6.0",
"front-matter": "^4.0.2",
Expand All @@ -109,7 +109,7 @@
"jest": "^28.1.1",
"lint-staged": "^13.0.2",
"lodash": "^4.17.21",
"markdownlint": "^0.25.1",
"markdownlint": "^0.26.0",
"markdownlint-cli": "^0.31.1",
"mdast-util-to-string": "^3.1.0",
"mini-css-extract-plugin": "^2.6.1",
Expand All @@ -131,13 +131,13 @@
"remark-html": "^15.0.1",
"remark-refractor": "montogeek/remark-refractor",
"rimraf": "^3.0.2",
"sass": "^1.52.3",
"sass": "^1.53.0",
"sass-loader": "^13.0.0",
"sirv-cli": "^2.0.2",
"sitemap-static": "^0.4.2",
"static-site-generator-webpack-plugin": "^3.4.1",
"style-loader": "^3.3.1",
"tailwindcss": "^3.1.3",
"tailwindcss": "^3.1.4",
"tap-spot": "^1.1.2",
"textlint": "^11.8.2",
"textlint-rule-heading": "^1.0.10",
Expand Down
4 changes: 4 additions & 0 deletions src/content/guides/csp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ related:
url: https://web.dev/trusted-types
---

<<<<<<< HEAD
Webpack 能够为其加载的所有脚本添加 `nonce`。要启用此功能,需要在引入的入口脚本中设置一个 `__webpack_nonce__` 变量。应该为每个唯一的页面视图生成和提供一个唯一的基于 hash 的 nonce,这就是为什么 `__webpack_nonce__` 要在入口文件中指定,而不是在配置中指定的原因。注意,`nonce` 应该是一个 base64 编码的字符串。
=======
Webpack is capable of adding a `nonce` to all scripts that it loads. To activate this feature, set a `__webpack_nonce__` variable and include it in your entry script. A unique hash-based `nonce` will then be generated and provided for each unique page view (this is why `__webpack_nonce__` is specified in the entry file and not in the configuration). Please note that the `__webpack_nonce__` should always be a base64-encoded string.
>>>>>>> 3e476d47e75b1cd8ccb0b02c8e0605d6d97bd073

## 示例 $#examples$

Expand Down
4 changes: 4 additions & 0 deletions src/content/guides/ecma-script-modules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ Node.js 通过设置 `package.json` 中的属性来显式设置文件模块类

除了模块格式外,将模块标记为 ESM 还会影响解析逻辑,操作逻辑和模块中的可用符号。

<<<<<<< HEAD
导入模块在 ESM 中更为严格,导入相对路径的模块必须包含文件名和文件扩展名。
=======
Imports in ESM are resolved more strictly. Relative requests must include a filename and file extension (e.g. `*.js` or `*.mjs`) unless you have the behaviour disabled with [`fullySpecified=false`](/configuration/module/#resolvefullyspecified).
>>>>>>> 3e476d47e75b1cd8ccb0b02c8e0605d6d97bd073

T> 依旧支持导入包,例如 `import "lodash"` .

Expand Down
Loading