Skip to content

Commit ecf45df

Browse files
authored
docs(Plugins): Replace overkill regex with a much simpler one (#7353)
1 parent 113e150 commit ecf45df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/content/plugins/normal-module-replacement-plugin.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ contributors:
55
- gonzoyumo
66
- byzyk
77
- chenxsan
8+
- askoufis
89
---
910

1011
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.
@@ -46,7 +47,7 @@ module.exports = function (env) {
4647
return {
4748
plugins: [
4849
new webpack.NormalModuleReplacementPlugin(
49-
/(.*)-APP_TARGET(\.*)/,
50+
/-APP_TARGET$/,
5051
function (resource) {
5152
resource.request = resource.request.replace(
5253
/-APP_TARGET/,

0 commit comments

Comments
 (0)