Skip to content

docs(en): merge webpack.js.org/master into webpack.js.org/cn @ c9d41a97 #1573

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 12 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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ updates:
interval: "daily"
labels:
- "dependencies"
<<<<<<< HEAD
allowed_updates:
- match:
dependency_name: "textlint"
=======
ignore:
- dependency-name: "react"
- dependency-name: "react-dom"
>>>>>>> c9d41a9702c4a01287497aa605f43cda350cf0d2
16 changes: 6 additions & 10 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Cypress run
uses: cypress-io/github-action@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn

- run: |
yarn
yarn cypress install
yarn cypress verify
yarn cypress:ci
config-file: cypress.config.js
build: yarn build
start: yarn serve-dist
command: yarn cypress:run
13 changes: 13 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
},
baseUrl: 'http://localhost:4200',
},
});
4 changes: 0 additions & 4 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"build": "run-s content && webpack --config webpack.prod.mjs --node-env production && run-s printable content && webpack --config webpack.ssg.mjs --node-env production --env ssg",
"postbuild": "npm run sitemap",
"build-test": "npm run build && http-server --port 4200 dist/",
"serve-dist": "http-server --port 4200 dist/",
"test": "npm run lint",
"lint": "run-s lint:*",
"lint:js": "npm run lint-js .",
Expand All @@ -57,7 +58,6 @@
"jest": "NODE_OPTIONS=--experimental-vm-modules jest --config=jest.config.mjs",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"cypress:ci": "start-server-and-test build-test http://localhost:4200 cypress:run",
"prettier": "prettier --write '**/*.{js,json,jsx,css,scss,md,mdx}'",
"prepare": "husky install"
},
Expand All @@ -76,7 +76,7 @@
"@babel/core": "^7.18.2",
"@babel/eslint-parser": "^7.18.2",
"@babel/plugin-proposal-class-properties": "^7.17.12",
"@babel/preset-env": "^7.18.0",
"@babel/preset-env": "^7.18.2",
"@babel/preset-react": "^7.17.12",
"@mdx-js/loader": "^2.0.0-next.9",
"@octokit/auth-action": "^1.3.3",
Expand All @@ -89,7 +89,7 @@
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.1",
"css-minimizer-webpack-plugin": "^4.0.0",
"cypress": "^9.7.0",
"cypress": "^10.0.0",
"directory-tree": "^3.3.0",
"directory-tree-webpack-plugin": "^1.0.3",
"duplexer": "^0.1.1",
Expand All @@ -103,19 +103,19 @@
"github-slugger": "^1.4.0",
"html-loader": "^2.1.2",
"html-webpack-plugin": "^5.5.0",
"http-server": "^14.1.0",
"http-server": "^14.1.1",
"husky": "^8.0.1",
"hyperlink": "^5.0.4",
"jest": "^28.1.0",
"lint-staged": "^12.4.3",
"lint-staged": "^13.0.0",
"lodash": "^4.17.21",
"markdownlint": "^0.25.1",
"markdownlint-cli": "^0.31.1",
"mdast-util-to-string": "^3.1.0",
"mini-css-extract-plugin": "^2.6.0",
"mkdirp": "^1.0.4",
"modularscale-sass": "^3.0.3",
"node-fetch": "^3.2.4",
"node-fetch": "^3.2.5",
"npm-run-all": "^4.1.1",
"postcss": "^8.4.14",
"postcss-loader": "^7.0.0",
Expand All @@ -131,22 +131,21 @@
"remark-html": "^15.0.1",
"remark-refractor": "montogeek/remark-refractor",
"rimraf": "^3.0.2",
"sass": "^1.52.1",
"sass": "^1.52.2",
"sass-loader": "^13.0.0",
"sirv-cli": "^2.0.2",
"sitemap-static": "^0.4.2",
"start-server-and-test": "^1.14.0",
"static-site-generator-webpack-plugin": "^3.4.1",
"style-loader": "^3.3.1",
"tailwindcss": "^3.0.24",
"tap-spot": "^1.1.2",
"textlint": "^11.8.2",
"textlint-rule-heading": "^1.0.10",
"unist-util-visit": "^4.1.0",
"webpack": "^5.72.1",
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.0",
"webpack-dev-server": "^4.9.1",
"webpack-merge": "^5.8.0",
"workbox-webpack-plugin": "^6.5.3"
},
Expand Down
61 changes: 61 additions & 0 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,68 @@ module.exports = {
const x = require(/* webpackIgnore: true */ 'x');
```

<<<<<<< HEAD
#### module.parser.javascript.exportsPresence $#moduleparserjavascriptexportspresence$
=======
#### module.parser.javascript.dynamicImportMode

Specifies global mode for dynamic import.

- Type: `'eager' | 'weak' | 'lazy' | 'lazy-once'`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportMode: 'lazy',
},
},
},
};
```

#### module.parser.javascript.dynamicImportPrefetch

Specifies global prefetch for dynamic import.

- Type: ` number | boolean`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportPrefetch: false,
},
},
},
};
```

#### module.parser.javascript.dynamicImportPreload

Specifies global preload for dynamic import.

- Type: ` number | boolean`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportPreload: false,
},
},
},
};
```

#### module.parser.javascript.exportsPresence
>>>>>>> c9d41a9702c4a01287497aa605f43cda350cf0d2

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

Expand Down
2 changes: 1 addition & 1 deletion src/content/plugins/module-federation-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {

Create a new runtime chunk with the specified name.

**webpack.js.org**
**webpack.config.js**

```js
const { ModuleFederationPlugin } = require('webpack').container;
Expand Down
Loading