Skip to content

docs(en): merge webpack.js.org/master into webpack.js.org/cn @ 80e0084c #1540

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 5 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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@pmmmwh/react-refresh-webpack-plugin": "next",
"@svgr/webpack": "^6.2.1",
"autoprefixer": "^10.4.4",
"babel-loader": "^8.2.4",
"babel-loader": "^8.2.5",
"copy-webpack-plugin": "^10.2.4",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^3.4.1",
Expand All @@ -107,7 +107,7 @@
"husky": "^7.0.4",
"hyperlink": "^5.0.4",
"jest": "^27.5.1",
"lint-staged": "^12.3.8",
"lint-staged": "^12.4.0",
"lodash": "^4.17.21",
"markdownlint": "^0.25.1",
"markdownlint-cli": "^0.31.1",
Expand Down
4 changes: 4 additions & 0 deletions src/content/concepts/module-resolution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ import '../src/file1';
import './file2';
```

<<<<<<< HEAD
在这种情况下,使用 `import` 或 `require` 的资源文件所处的目录,被认为是上下文目录。在 `import/require` 中给定的相对路径,会拼接此上下文路径,来生成模块的绝对路径。
=======
In this case, the directory of the source file where the `import` or `require` occurs is taken to be the context directory. The relative path specified in the `import/require` is joined to this context path to produce the absolute path to the module.
>>>>>>> 80e0084cc947bb14c7cb5e820b507709b9e63e98

### 模块路径 $#module-paths$

Expand Down
19 changes: 19 additions & 0 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,25 @@ const x = require(/* webpackIgnore: true */ 'x');
};
```

#### module.parser.javascript.importMeta

Enable or disable evaluating `import.meta`.

- Type: `boolean = true`
- Available: 5.68.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
importMeta: false,
},
},
},
};
```

#### module.parser.javascript.importMetaContext

启用/禁用 [`import.meta.webpackContext`](/api/module-variables/#importmetawebpackcontext) 分析。
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3599,10 +3599,10 @@ babel-jest@^27.5.1:
graceful-fs "^4.2.9"
slash "^3.0.0"

babel-loader@^8.2.4:
version "8.2.4"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.4.tgz#95f5023c791b2e9e2ca6f67b0984f39c82ff384b"
integrity sha512-8dytA3gcvPPPv4Grjhnt8b5IIiTcq/zeXOPk4iTYI0SVXcsmuGg7JtBRDp8S9X+gJfhQ8ektjXZlDu1Bb33U8A==
babel-loader@^8.2.5:
version "8.2.5"
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.5.tgz#d45f585e654d5a5d90f5350a779d7647c5ed512e"
integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ==
dependencies:
find-cache-dir "^3.3.1"
loader-utils "^2.0.0"
Expand Down Expand Up @@ -8152,12 +8152,12 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

[email protected], lilconfig@^2.0.3:
[email protected]:
version "2.0.4"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082"
integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==

lilconfig@^2.0.5:
lilconfig@^2.0.3, lilconfig@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25"
integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==
Expand All @@ -8174,10 +8174,10 @@ linkify-it@^3.0.1:
dependencies:
uc.micro "^1.0.1"

lint-staged@^12.3.8:
version "12.3.8"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.8.tgz#ee3fe2e16c9d76f99d8348072900b017d6d76901"
integrity sha512-0+UpNaqIwKRSGAFOCcpuYNIv/j5QGVC+xUVvmSdxHO+IfIGoHbFLo3XcPmV/LLnsVj5EAncNHVtlITSoY5qWGQ==
lint-staged@^12.4.0:
version "12.4.0"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.4.0.tgz#1fb8c73ac7a1c670b87bd2c1bf1e302c866e77af"
integrity sha512-3X7MR0h9b7qf4iXf/1n7RlVAx+EzpAZXoCEMhVSpaBlgKDfH2ewf+QUm7BddFyq29v4dgPP+8+uYpWuSWx035A==
dependencies:
cli-truncate "^3.1.0"
colorette "^2.0.16"
Expand Down