From c88ec9225e0b3703f8fea3d81610c4e0857c74fd Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Tue, 20 Sep 2022 01:26:45 +0100 Subject: [PATCH 01/11] docs(configuration): move `name` option to correct place (#6407) * docs(configuration): move `name` option to correct place The `name` option was listed under the `output` object which is incorrect. Move it to top-level configuration object. * docs(configuration): place `name` option at the top of config object * docs(configuration): fix spacing * docs(configuration): fix whitespace Co-authored-by: Sam Chen Co-authored-by: Sam Chen --- src/content/configuration/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/configuration/index.mdx b/src/content/configuration/index.mdx index da67f77e5dc6..5660d2b46ff4 100644 --- a/src/content/configuration/index.mdx +++ b/src/content/configuration/index.mdx @@ -18,6 +18,7 @@ contributors: - bigdawggi - anshumanv - textbook + - coly010 --- Out of the box, webpack won't require you to use a configuration file. However, it will assume the entry point of your project is `src/index.js` and will output the result in `dist/main.js` minified and optimized for production. @@ -56,6 +57,7 @@ W> Notice that many array configurations allow to reference the default value vi const path = require('path'); module.exports = { + name: "my-config", // name of the configuration, shown in output mode: "production", // "production" | "development" | "none" @@ -178,8 +180,6 @@ module.exports = { }, uniqueName: "my-application", // (defaults to package.json "name") // unique name for this build to avoid conflicts with other builds in the same HTML - name: "my-config", - // name of the configuration, shown in output /* Advanced output configuration (click to show) */ From a82ed1b187754e3b3c0b27e4f0e4afdefb1d90ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 08:37:17 +0800 Subject: [PATCH 02/11] build(deps-dev): bump webpack-dev-server from 4.11.0 to 4.11.1 (#6409) Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 4.11.0 to 4.11.1. - [Release notes](https://github.com/webpack/webpack-dev-server/releases) - [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/webpack-dev-server/compare/v4.11.0...v4.11.1) --- updated-dependencies: - dependency-name: webpack-dev-server dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e04c7bed9e23..61ab799392b0 100644 --- a/package.json +++ b/package.json @@ -139,7 +139,7 @@ "webpack": "^5.74.0", "webpack-bundle-analyzer": "^4.6.1", "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.0", + "webpack-dev-server": "^4.11.1", "webpack-merge": "^5.8.0", "workbox-webpack-plugin": "^6.5.4", "yarn-deduplicate": "^6.0.0" diff --git a/yarn.lock b/yarn.lock index c625997f2cba..858fbf72b909 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10530,10 +10530,10 @@ select@^1.1.2: resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selfsigned@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.0.1.tgz#8b2df7fa56bf014d19b6007655fff209c0ef0a56" - integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== +selfsigned@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" + integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== dependencies: node-forge "^1" @@ -12198,10 +12198,10 @@ webpack-dev-middleware@^5.3.1: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.0.tgz#290ee594765cd8260adfe83b2d18115ea04484e7" - integrity sha512-L5S4Q2zT57SK7tazgzjMiSMBdsw+rGYIX27MgPgx7LDhWO0lViPrHKoLS7jo5In06PWYAhlYu3PbyoC6yAThbw== +webpack-dev-server@^4.11.1: + version "4.11.1" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz#ae07f0d71ca0438cf88446f09029b92ce81380b5" + integrity sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -12226,7 +12226,7 @@ webpack-dev-server@^4.11.0: p-retry "^4.5.0" rimraf "^3.0.2" schema-utils "^4.0.0" - selfsigned "^2.0.1" + selfsigned "^2.1.1" serve-index "^1.9.1" sockjs "^0.3.24" spdy "^4.0.2" From 3b68bd69a6aa489c5f5b96ab24a1761a9354b157 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 22:13:48 +0800 Subject: [PATCH 03/11] build(deps-dev): bump eslint-plugin-mdx from 2.0.4 to 2.0.5 (#6410) Bumps [eslint-plugin-mdx](https://github.com/mdx-js/eslint-mdx) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/mdx-js/eslint-mdx/releases) - [Changelog](https://github.com/mdx-js/eslint-mdx/blob/master/CHANGELOG.md) - [Commits](https://github.com/mdx-js/eslint-mdx/compare/v2.0.4...v2.0.5) --- updated-dependencies: - dependency-name: eslint-plugin-mdx dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 61ab799392b0..19ef52652f80 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "eslint": "^8.23.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-cypress": "^2.12.1", - "eslint-plugin-mdx": "^2.0.4", + "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", "front-matter": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index 858fbf72b909..05cf7444b826 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4896,10 +4896,10 @@ eslint-config-prettier@^8.5.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== -eslint-mdx@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/eslint-mdx/-/eslint-mdx-2.0.4.tgz#f3c7dfebf852e960ecc0d2f44de8fd3c9599f8eb" - integrity sha512-SEgeWByCKYNRSqV+FtxHIcBadW7xCDtfZVACEZgFN1woGuPbr1XQicUMHO5pE0LSSQfWNHXTXP9MCMBkRRVS4A== +eslint-mdx@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/eslint-mdx/-/eslint-mdx-2.0.5.tgz#f26ae220192dd368b1c1ee670282cc28c50c244a" + integrity sha512-1ZzcJwJNfladtuK+uuG/MdC0idc1e3d1vCI2STOq/pLcJBGuao2biWh90vEh2M93zDiNoHJGUIU7UAxupiiHFw== dependencies: acorn "^8.8.0" acorn-jsx "^5.3.2" @@ -4930,12 +4930,12 @@ eslint-plugin-markdown@^3.0.0: dependencies: mdast-util-from-markdown "^0.8.5" -eslint-plugin-mdx@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-mdx/-/eslint-plugin-mdx-2.0.4.tgz#ae5226c6340f46b007198921d3c6872196f1e153" - integrity sha512-dDxtpaQl4EFAj8pZKa3Wk5s6QH2wz22Ba25j4OtW40zkB2Bb/Su/8xWoikF61bZoL99Y3aUV24eUTS39n0PJLQ== +eslint-plugin-mdx@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-mdx/-/eslint-plugin-mdx-2.0.5.tgz#7717a6e2f5c8f28530b1ef7a612f55430fb4726e" + integrity sha512-j2xN97jSlc5IoH94rJTHqYMztl46+hHzyC8Zqjx+OI1Rvv33isyf8xSSBHN6f0z8IJmgPgGsb/fH90JbvKplXg== dependencies: - eslint-mdx "^2.0.4" + eslint-mdx "^2.0.5" eslint-plugin-markdown "^3.0.0" remark-mdx "^2.1.3" remark-parse "^10.0.1" From 7c2cc4e93c5e982547a3638dc18e2e3ab8136975 Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Wed, 21 Sep 2022 08:00:17 +0800 Subject: [PATCH 04/11] docs(guides): add emit section for asset modules (#6411) --- src/content/guides/asset-modules.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/content/guides/asset-modules.mdx b/src/content/guides/asset-modules.mdx index ede35935412d..0b47ba63a3d2 100644 --- a/src/content/guides/asset-modules.mdx +++ b/src/content/guides/asset-modules.mdx @@ -472,3 +472,24 @@ module: { ] }, ``` + +## Disable emitting assets + +For use cases like Server side rendering, you might want to disable emitting assets, which is feasible with [`emit`](/configuration/module/#rulegeneratoremit) option under `Rule.generator`: + +```js +module.exports = { + // … + module: { + rules: [ + { + test: /\.png$/i, + type: 'asset/resource', + generator: { + emit: false, + }, + }, + ], + }, +}; +``` From a061579e8da56d16c155f8b5ba4ed308596d8e68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 08:57:55 +0800 Subject: [PATCH 05/11] build(deps-dev): bump lightningcss from 1.15.1 to 1.16.0 (#6412) Bumps [lightningcss](https://github.com/parcel-bundler/lightningcss) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/parcel-bundler/lightningcss/releases) - [Commits](https://github.com/parcel-bundler/lightningcss/compare/v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: lightningcss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 104 +++++++++++++++++++++++++-------------------------- 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index 19ef52652f80..a2fa63a77f2a 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "husky": "^8.0.1", "hyperlink": "^5.0.4", "jest": "^29.0.3", - "lightningcss": "^1.15.1", + "lightningcss": "^1.16.0", "lint-staged": "^13.0.3", "lodash": "^4.17.21", "markdownlint": "^0.26.2", diff --git a/yarn.lock b/yarn.lock index 05cf7444b826..94dcdc14f781 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7369,61 +7369,61 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lightningcss-darwin-arm64@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.15.1.tgz#9b15f7d65898cae9ceae11d5c7ef6ea64edcce16" - integrity sha512-4bqe9OCWzj8gPgwzpDK7TPopIoKx9CQMPVN83/+T5LVLkh9sSS0ltZLjAFI399GIkC6idl6rguUQ5qPeq4yxsQ== - -lightningcss-darwin-x64@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.15.1.tgz#897cd5eb116fe50c7608c3936fbc8277b5e26498" - integrity sha512-1W7kt2Nd0lPFkZ5VzieJfs/ePVADysM3FS33HcUUzktE52vWL2B6S4ntWibHj6Ccg/lDH5o6GiLcCYwpOPLHug== - -lightningcss-linux-arm-gnueabihf@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.15.1.tgz#2d14a9115769bf63cbeb2e0676ba4fb3b69bec2c" - integrity sha512-8FijfM4HGJPCQPB9nAaTjdOE2PGQYE66t1wvV+SR915dEePn4yyRdCBJitlas5B6aTAE2AMwEuEl1i/pVDmkGw== - -lightningcss-linux-arm64-gnu@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.15.1.tgz#2a674bf9b1aef16a39ae49a3dc7d132a0904206e" - integrity sha512-ZhCv3MlApRTIwszlNQ2t7FST7qK+M1iP6apTvOetPwDlzOMZ5dcH0a1453JPm4CwOSzHZ8079gnb5EqtU4+pjg== - -lightningcss-linux-arm64-musl@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.15.1.tgz#13bb83b88cc9663377596f26311faa8c664aa4eb" - integrity sha512-cGhslFivvMLSIsesZbEaUurXRJMGUftHukiY5DjWtXkA2iIqqV7TyK3j6ZJPy76hlRKsjU/WO8CrabAvr6kmsw== - -lightningcss-linux-x64-gnu@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.15.1.tgz#890d163801c634b2e2f35807093ccc0bc906170c" - integrity sha512-uVfUgRUjq7laAR9A027oqGPcq72Y/hPVEEqb9agWzNqYvZyT0VAqNxp9g2ncL//gOD1vTwQntcwDhrI5VE2PCw== - -lightningcss-linux-x64-musl@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.15.1.tgz#ff4c88600e1f3839e7b68b1ab526788caa06db90" - integrity sha512-n2cRPHxL57N+YMsBodF9HogieOicmlQVUCFM+RF0FOzayA8LdypacNWI3EDzbERWfkBAWtx2eLvV50DOJrkQdg== - -lightningcss-win32-x64-msvc@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.15.1.tgz#a7336edcbbacd604de342eefa92183089e3215f2" - integrity sha512-wHGJZnCmHU14cL3mmVNZm1yDz55m8EKxwPhACZTq+/QOvLMeIXQ4qLvNzdvtVL5KESPwz4hjYsYsSNCtpcTfOA== - -lightningcss@^1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.15.1.tgz#a951a0ef651a0d026de4f3ec03bd2a6feae25da4" - integrity sha512-d4fqKl8sqpdM27OsseAbKKxhD2otiu6stS7yWlm/DA7wOQAIDKMu/dke54cEN8ED19v9H2pEzMPGTsRfnq3Rdg== +lightningcss-darwin-arm64@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.16.0.tgz#f3318a2e64ca160610977675ee1a7e611f4a3617" + integrity sha512-gIhz6eZFwsC4oVMjBGQ3QWDdLQY7vcXFyM/x91PilgHqu63B9uBa10EZA75YoTEkbKhoz0uDCqyHh/EoF1GrkQ== + +lightningcss-darwin-x64@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.16.0.tgz#46361b701b572ce9ec29730624000b439c2184bb" + integrity sha512-kLPi+OEpDj3UGY6DC8TfjbcULJDKMP+TVKSlrEkNGn8t1YRzi2g4oy7UVTSB5AnSbT0CusUItzdVjHQ49EdoNA== + +lightningcss-linux-arm-gnueabihf@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.16.0.tgz#5da29f465dd44d98434b00b424cc4b445ea49eff" + integrity sha512-oSwEbvXUPr//H/ainBRJXTxHerlheee/KgkTTmAQWiVnt8HV+bRohTBWWPBy5ZArgiGLwj7ogv45istgljPN2Q== + +lightningcss-linux-arm64-gnu@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.16.0.tgz#21d139f5201c9b8bb3972c24116a5bcbb7e2c3b5" + integrity sha512-Drq9BSVIvmV9zsDJbCZWCulMvKMQWFIlYXPCKV/iwRj+ZAJ1BRngma0cNHB6uW7Wac8Jg04CJN5IA4ELE3J+cQ== + +lightningcss-linux-arm64-musl@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.16.0.tgz#d06936e0570fb51d58cc18ef2fb8858aeecd1979" + integrity sha512-1QXWStnTEo4RFQf0mfGhRyNUeEHilCZ0NA97XgwKwrYr/M7sYKU/1HWY00dPxFJ6GITR2pfJGo9xi3ScSSBxbA== + +lightningcss-linux-x64-gnu@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.16.0.tgz#fd9881cd839cac4676a01b713b06b0b178743f87" + integrity sha512-gD2eQYD5OFs1p83R0TcMCEc5HRyJES4lR4THmclv7khm3dc9vc+2VT0kFBPxO1L2AwlZuvXaaMan7X1Ul7uSfA== + +lightningcss-linux-x64-musl@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.16.0.tgz#697d87448e0f6445b6fc3cf8529d89709f3bfacc" + integrity sha512-HJsKeYxloEvg2WCQhtYPqzZUliLu9JBJNeI5y9cPQeDR/7ayGGLbVhJaotPtzJkElOFL/SaXsS+FRuH4w+yafg== + +lightningcss-win32-x64-msvc@1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.16.0.tgz#e4a09c12a48534121ecd03ef0be8dadbbbbb63b6" + integrity sha512-h4ayyAlOMLUHV9NdofcIu79aEjmly93adVxcg5wDJpkvMiwDTufEN30M8G4gGcjo1JE5jFjAcyQcRpXYkYcemA== + +lightningcss@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/lightningcss/-/lightningcss-1.16.0.tgz#4c8e4ef8133d54488d1482a115d3758259191c52" + integrity sha512-5+ZS9h+xeADcJTF2oRCT3yNZBlDYyOgQSdrWNBCqsIwm8ucKbF061OBVv/WHP4Zk8FToNhwFklk/hMuOngqsIg== dependencies: detect-libc "^1.0.3" optionalDependencies: - lightningcss-darwin-arm64 "1.15.1" - lightningcss-darwin-x64 "1.15.1" - lightningcss-linux-arm-gnueabihf "1.15.1" - lightningcss-linux-arm64-gnu "1.15.1" - lightningcss-linux-arm64-musl "1.15.1" - lightningcss-linux-x64-gnu "1.15.1" - lightningcss-linux-x64-musl "1.15.1" - lightningcss-win32-x64-msvc "1.15.1" + lightningcss-darwin-arm64 "1.16.0" + lightningcss-darwin-x64 "1.16.0" + lightningcss-linux-arm-gnueabihf "1.16.0" + lightningcss-linux-arm64-gnu "1.16.0" + lightningcss-linux-arm64-musl "1.16.0" + lightningcss-linux-x64-gnu "1.16.0" + lightningcss-linux-x64-musl "1.16.0" + lightningcss-win32-x64-msvc "1.16.0" lilconfig@2.0.5: version "2.0.5" From 1d4385900b8a99dd219636b509026c943a0880a3 Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Wed, 21 Sep 2022 21:36:16 +0800 Subject: [PATCH 06/11] docs(api): improve logging api (#6413) --- src/content/api/logging.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/content/api/logging.mdx b/src/content/api/logging.mdx index c5c346e772a4..34e5df7f1bd9 100644 --- a/src/content/api/logging.mdx +++ b/src/content/api/logging.mdx @@ -58,6 +58,13 @@ module.exports = function (source) { }; ``` +As you can see from the above `my-webpack-plugin.js` example, there're two types of logging methods, + +1. `compilation.getLogger` +2. `compiler.getInfrastructureLogger` + +It's advised to use `compilation.getLogger` when plugin/logging is related to the compilation, and they will be stored within the stats. For logging that happens outside the compilation cycle, use `compiler.getInfrastructureLogger` instead. + ## Logger methods - `logger.error(...)`: for error messages From 9060a927841cf11722369b1bb74e0d2c3a3b346a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:44:43 +0800 Subject: [PATCH 07/11] build(deps-dev): bump autoprefixer from 10.4.11 to 10.4.12 (#6414) Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.11 to 10.4.12. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/autoprefixer/compare/10.4.11...10.4.12) --- updated-dependencies: - dependency-name: autoprefixer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index a2fa63a77f2a..4357985c9c68 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@octokit/rest": "^19.0.4", "@pmmmwh/react-refresh-webpack-plugin": "next", "@svgr/webpack": "^6.3.1", - "autoprefixer": "^10.4.11", + "autoprefixer": "^10.4.12", "babel-loader": "^8.2.5", "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.1", diff --git a/yarn.lock b/yarn.lock index 94dcdc14f781..84cf91a6dd18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3166,13 +3166,13 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -autoprefixer@^10.4.11: - version "10.4.11" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.11.tgz#835136aff1d9cd43640151e0d2dba00f8eac7c1c" - integrity sha512-5lHp6DgRodxlBLSkzHOTcufWFflH1ewfy2hvFQyjrblBFlP/0Yh4O/Wrg4ow8WRlN3AAUFFLAQwX8hTptzqVHg== +autoprefixer@^10.4.12: + version "10.4.12" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.12.tgz#183f30bf0b0722af54ee5ef257f7d4320bb33129" + integrity sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q== dependencies: - browserslist "^4.21.3" - caniuse-lite "^1.0.30001399" + browserslist "^4.21.4" + caniuse-lite "^1.0.30001407" fraction.js "^4.2.0" normalize-range "^0.1.2" picocolors "^1.0.0" @@ -3456,15 +3456,15 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.21.3: - version "4.21.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" - integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.21.3, browserslist@^4.21.4: + version "4.21.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" + integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== dependencies: - caniuse-lite "^1.0.30001370" - electron-to-chromium "^1.4.202" + caniuse-lite "^1.0.30001400" + electron-to-chromium "^1.4.251" node-releases "^2.0.6" - update-browserslist-db "^1.0.5" + update-browserslist-db "^1.0.9" bser@2.1.1: version "2.1.1" @@ -3570,10 +3570,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001370, caniuse-lite@^1.0.30001399: - version "1.0.30001399" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001399.tgz#1bf994ca375d7f33f8d01ce03b7d5139e8587873" - integrity sha512-4vQ90tMKS+FkvuVWS5/QY1+d805ODxZiKFzsU8o/RsVJz49ZSRR8EjykLJbqhzdPgadbX6wB538wOzle3JniRA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001407: + version "1.0.30001409" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001409.tgz#6135da9dcab34cd9761d9cdb12a68e6740c5e96e" + integrity sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ== caseless@~0.12.0: version "0.12.0" @@ -4688,10 +4688,10 @@ ejs@^3.1.6: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.202: - version "1.4.206" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz#580ff85b54d7ec0c05f20b1e37ea0becdd7b0ee4" - integrity sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA== +electron-to-chromium@^1.4.251: + version "1.4.256" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.256.tgz#c735032f412505e8e0482f147a8ff10cfca45bf4" + integrity sha512-x+JnqyluoJv8I0U9gVe+Sk2st8vF0CzMt78SXxuoWCooLLY2k5VerIBdpvG7ql6GKI4dzNnPjmqgDJ76EdaAKw== emittery@^0.10.2: version "0.10.2" @@ -11924,10 +11924,10 @@ upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== -update-browserslist-db@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" - integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== +update-browserslist-db@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz#2924d3927367a38d5c555413a7ce138fc95fcb18" + integrity sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" From 0ccd06c7ae1db476663cedf69047722fc9f87c32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:27:50 +0800 Subject: [PATCH 08/11] build(deps-dev): bump sass from 1.54.9 to 1.55.0 (#6416) Bumps [sass](https://github.com/sass/dart-sass) from 1.54.9 to 1.55.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.54.9...1.55.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4357985c9c68..6ee82208317c 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "remark-html": "^15.0.1", "remark-refractor": "montogeek/remark-refractor", "rimraf": "^3.0.2", - "sass": "^1.54.9", + "sass": "^1.55.0", "sass-loader": "^13.0.2", "sirv-cli": "^2.0.2", "sitemap-static": "^0.4.2", diff --git a/yarn.lock b/yarn.lock index 84cf91a6dd18..d6011ba6d275 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10446,10 +10446,10 @@ sass-loader@^13.0.2: klona "^2.0.4" neo-async "^2.6.2" -sass@^1.54.9: - version "1.54.9" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.54.9.tgz#b05f14ed572869218d1a76961de60cd647221762" - integrity sha512-xb1hjASzEH+0L0WI9oFjqhRi51t/gagWnxLiwUNMltA0Ab6jIDkAacgKiGYKM9Jhy109osM7woEEai6SXeJo5Q== +sass@^1.55.0: + version "1.55.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c" + integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" From 97e2ef2d6dc051ac4253b759dfa9d657c80d3661 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:38:34 +0800 Subject: [PATCH 09/11] build(deps): bump react-router-dom from 6.4.0 to 6.4.1 (#6417) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.4.1/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 6ee82208317c..3786d8616c2d 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "react-helmet-async": "^1.3.0", - "react-router-dom": "^6.4.0", + "react-router-dom": "^6.4.1", "react-spring": "^9.5.4", "react-tiny-popover": "5", "react-use": "^17.4.0", diff --git a/yarn.lock b/yarn.lock index d6011ba6d275..26958b7e9586 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2126,10 +2126,10 @@ "@react-spring/shared" "~9.5.4" "@react-spring/types" "~9.5.4" -"@remix-run/router@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.0.0.tgz#a2189335a5f6428aa904ccc291988567018b6e01" - integrity sha512-SCR1cxRSMNKjaVYptCzBApPDqGwa3FGdjVHc+rOToocNPHQdIYLZBfv/3f+KvYuXDkUGVIW9IAzmPNZDRL1I4A== +"@remix-run/router@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.0.1.tgz#88d7ac31811ab0cef14aaaeae2a0474923b278bc" + integrity sha512-eBV5rvW4dRFOU1eajN7FmYxjAIVz/mRHgUE9En9mBn6m3mulK3WTR5C3iQhL9MZ14rWAq+xOlEaCkDiW0/heOg== "@rollup/plugin-babel@^5.2.0": version "5.2.2" @@ -9846,19 +9846,20 @@ react-refresh@^0.14.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== -react-router-dom@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.4.0.tgz#a7d7c394c9e730b045cdd4f5d6c2d1ccb9e26947" - integrity sha512-4Aw1xmXKeleYYQ3x0Lcl2undHR6yMjXZjd9DKZd53SGOYqirrUThyUb0wwAX5VZAyvSuzjNJmZlJ3rR9+/vzqg== +react-router-dom@^6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.4.1.tgz#99c9b7c4967890701c888517475aa5d54d25760e" + integrity sha512-MY7NJCrGNVJtGp8ODMOBHu20UaIkmwD2V3YsAOUQoCXFk7Ppdwf55RdcGyrSj+ycSL9Uiwrb3gTLYSnzcRoXww== dependencies: - react-router "6.4.0" + "@remix-run/router" "1.0.1" + react-router "6.4.1" -react-router@6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.4.0.tgz#68449c23dc893fc7a57db068c19987be1de72edb" - integrity sha512-B+5bEXFlgR1XUdHYR6P94g299SjrfCBMmEDJNcFbpAyRH1j1748yt9NdDhW3++nw1lk3zQJ6aOO66zUx3KlTZg== +react-router@6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.4.1.tgz#dd9cc4dfa264751d143a4b6c9d4faa60ab3ce26c" + integrity sha512-OJASKp5AykDWFewgWUim1vlLr7yfD4vO/h+bSgcP/ix8Md+LMHuAjovA74MQfsfhQJGGN1nHRhwS5qQQbbBt3A== dependencies: - "@remix-run/router" "1.0.0" + "@remix-run/router" "1.0.1" react-spring@^9.5.4: version "9.5.4" From 10fd714341e530b6cecd7f1e41b2935e5a899aaa Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Fri, 23 Sep 2022 18:44:45 +0800 Subject: [PATCH 10/11] CI: running e2e tests with Chrome (#6415) * upgrade cypress * use chrome for e2e test * run in chrome --- .github/workflows/testing.yml | 1 + package.json | 4 ++-- yarn.lock | 18 +++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 60cf0ee24652..75cdb9529f49 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -116,6 +116,7 @@ jobs: - name: Cypress run uses: cypress-io/github-action@v4 with: + browser: chrome config-file: cypress.config.js build: yarn build start: yarn serve-dist diff --git a/package.json b/package.json index 3786d8616c2d..8334e747a36d 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "printable": "node ./src/scripts/concatenate-docs.mjs", "jest": "NODE_OPTIONS=--experimental-vm-modules jest --config=jest.config.mjs", "cypress:open": "cypress open", - "cypress:run": "cypress run", + "cypress:run": "cypress run --browser chrome", "prettier": "prettier --write '**/*.{js,json,jsx,css,scss,md,mdx}'", "prepare": "husky install && rimraf ./node_modules/.cache/webpack && yarn-deduplicate --strategy fewer" }, @@ -85,7 +85,7 @@ "copy-webpack-plugin": "^11.0.0", "css-loader": "^6.7.1", "css-minimizer-webpack-plugin": "^4.1.0", - "cypress": "^10.7.0", + "cypress": "^10.8.0", "directory-tree": "^3.3.1", "directory-tree-webpack-plugin": "^1.0.3", "duplexer": "^0.1.1", diff --git a/yarn.lock b/yarn.lock index 26958b7e9586..7007027c8cca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4263,10 +4263,10 @@ csstype@^3.0.6: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.6.tgz#865d0b5833d7d8d40f4e5b8a6d76aea3de4725ef" integrity sha512-+ZAmfyWMT7TiIlzdqJgjMb7S4f1beorDbWbsocyK4RaiqA5RTX3K14bnBWmmA9QEM0gRdsjyyrEmcyga8Zsxmw== -cypress@^10.7.0: - version "10.7.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.7.0.tgz#2d37f8b9751c6de33ee48639cb7e67a2ce593231" - integrity sha512-gTFvjrUoBnqPPOu9Vl5SBHuFlzx/Wxg/ZXIz2H4lzoOLFelKeF7mbwYUOzgzgF0oieU2WhJAestQdkgwJMMTvQ== +cypress@^10.8.0: + version "10.8.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.8.0.tgz#12a681f2642b6f13d636bab65d5b71abdb1497a5" + integrity sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -4287,7 +4287,7 @@ cypress@^10.7.0: dayjs "^1.10.4" debug "^4.3.2" enquirer "^2.3.6" - eventemitter2 "^6.4.3" + eventemitter2 "6.4.7" execa "4.1.0" executable "^4.1.1" extract-zip "2.0.1" @@ -5145,10 +5145,10 @@ eval@^0.1.0, eval@^0.1.5: dependencies: require-like ">= 0.1.1" -eventemitter2@^6.4.3: - version "6.4.4" - resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.4.tgz#aa96e8275c4dbeb017a5d0e03780c65612a1202b" - integrity sha512-HLU3NDY6wARrLCEwyGKRBvuWYyvW6mHYv72SJJAH3iJN3a6eVUvkjFkcxah1bcTgGVBBrFdIopBJPhCQFMLyXw== +eventemitter2@6.4.7: + version "6.4.7" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" + integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== eventemitter3@^4.0.0: version "4.0.7" From bde990a7603dba2eb4d0e04e9c67dea8f5702e0a Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Mon, 26 Sep 2022 20:17:49 +0800 Subject: [PATCH 11/11] docs(configuration): mention default watchOptions.poll value (#6419) --- src/content/configuration/watch.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/configuration/watch.mdx b/src/content/configuration/watch.mdx index 1ce35c77ae4b..556b4b72c260 100644 --- a/src/content/configuration/watch.mdx +++ b/src/content/configuration/watch.mdx @@ -11,6 +11,7 @@ contributors: - Neob91 - Loonride - snitin315 + - chenxsan --- Webpack can watch files and recompile whenever they change. This page explains how to enable this and a couple of tweaks you can make if watching does not work properly for you. @@ -128,7 +129,7 @@ T> If you use `require.context`, webpack will watch your entire directory. You w `boolean = false` `number` -Turn on [polling]() by passing `true`, or specifying a poll interval in milliseconds: +Turn on [polling]() by passing `true` which would set the default poll interval to [`5007`](https://github.com/webpack/watchpack/blob/a54bcdb95759558ca5a9fc2819c4d71b771c162f/lib/DirectoryWatcher.js#L79), or specifying a poll interval in milliseconds: **webpack.config.js**