From afb51235dbd00e4b2476a1378063b5953f85390b Mon Sep 17 00:00:00 2001 From: chenxsan Date: Tue, 14 Sep 2021 18:27:56 +0800 Subject: [PATCH 1/2] docs(plugins): add a note for resourceRegExp --- src/content/plugins/normal-module-replacement-plugin.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/plugins/normal-module-replacement-plugin.mdx b/src/content/plugins/normal-module-replacement-plugin.mdx index 6e7d9cecc6c2..56d946c40280 100644 --- a/src/content/plugins/normal-module-replacement-plugin.mdx +++ b/src/content/plugins/normal-module-replacement-plugin.mdx @@ -4,6 +4,7 @@ group: webpack contributors: - gonzoyumo - byzyk + - chenxsan --- The `NormalModuleReplacementPlugin` allows you to replace resources that match `resourceRegExp` with `newResource`. If `newResource` is relative, it is resolved relative to the previous resource. If `newResource` is a function, it is expected to overwrite the request attribute of the supplied resource. @@ -14,6 +15,8 @@ This can be useful for allowing different behaviour between builds. new webpack.NormalModuleReplacementPlugin(resourceRegExp, newResource); ``` +Note that the `resourceRegExp` is tested against the request you write in your code, not the resolved resource. For instance, `'./sum'` will be used to test instead of `./sum.js` when you have code `import sum from './sum'`. + ## Basic Example Replace a specific module when building for a [development environment](/guides/production). From b31b287876d22421ddd9536c329bd8f0e529634c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Oct 2022 05:37:01 +0000 Subject: [PATCH 2/2] build(deps): bump react-tiny-popover from 5.1.0 to 7.2.0 Bumps [react-tiny-popover](https://github.com/alexkatz/react-tiny-popover) from 5.1.0 to 7.2.0. - [Release notes](https://github.com/alexkatz/react-tiny-popover/releases) - [Changelog](https://github.com/alexkatz/react-tiny-popover/blob/master/CHANGELOG.md) - [Commits](https://github.com/alexkatz/react-tiny-popover/commits) --- updated-dependencies: - dependency-name: react-tiny-popover dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b1a7f46df6c0..29f6b91aadcc 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "react-helmet-async": "^1.1.2", "react-router-dom": "^5.3.0", "react-spring": "^9.2.4", - "react-tiny-popover": "5", + "react-tiny-popover": "7", "react-use": "^17.3.1", "react-visibility-sensor": "^5.0.2", "unist-util-visit": "^2.0.3", diff --git a/yarn.lock b/yarn.lock index 87feccfc03ef..df62fcf7664c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10094,10 +10094,10 @@ react-textarea-autosize@^5.2.1: dependencies: prop-types "^15.6.0" -react-tiny-popover@5: - version "5.1.0" - resolved "https://registry.yarnpkg.com/react-tiny-popover/-/react-tiny-popover-5.1.0.tgz#a205b39844352f32b4b0658fd96a9738d8626d9c" - integrity sha512-VjBp6Q1f4cJ2xiuyU1rhFnrs+fdnWCYFSrKRN4DTGD2ovchOAGR1jbJ9vgV34TtvMPON+SqBBZFnahVsAGmrUQ== +react-tiny-popover@7: + version "7.2.0" + resolved "https://registry.yarnpkg.com/react-tiny-popover/-/react-tiny-popover-7.2.0.tgz#e6277620efea6acea9c47efbfe5dcb473a552e99" + integrity sha512-AIliRDqTFB1+qy4GvWn+8B8JPKA13xtESWYdFkrdCeI8hEnPKufBvcF9a3dO/0SmD21mV6721xxhAnUm8TRXJw== react-universal-interface@^0.6.2: version "0.6.2"