Skip to content

Commit

Permalink
simplified regex (removed unnecessary escape char)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyINeedToFillUsername authored Nov 23, 2023
1 parent aa2d202 commit dda8efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/plugins/normal-module-replacement-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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'`.

Also please note that when using Windows, you have to accomodate for the different folder separator symbol. E.g. `/src\/environments\/environment\.ts/` won't work on Windows, you have to use `/src[\\\/]environments[\\\/]environment\.ts/` instead.
Also please note that when using Windows, you have to accomodate for the different folder separator symbol. E.g. `/src\/environments\/environment\.ts/` won't work on Windows, you have to use `/src[\\/]environments[\\/]environment\.ts/,` instead.

## Basic Example

Expand Down

0 comments on commit dda8efb

Please sign in to comment.