Skip to content

Commit a4c0b88

Browse files
authored
Update README.md
replace `\` with `\\` as it gave me a hard time figuring what's wrong with the replacer in such string `$APPID$` and using `\$` would just return plain `$` and then parsed as the end of matcher, so you should use `\\$` so it passes `\$` to the regex, and then it works fines.
1 parent a2e006c commit a4c0b88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
test: /fileInWhichJQueryIsUndefined\.js$/,
6464
loader: 'string-replace-loader',
6565
options: {
66-
search: /\$/i,
66+
search: /\\$/i,
6767
replace: 'window.jQuery'
6868
}
6969
}
@@ -81,7 +81,7 @@ module.exports = {
8181
test: /fileInWhichJQueryIsUndefined\.js$/,
8282
loader: 'string-replace-loader',
8383
options: {
84-
search: '\$',
84+
search: '\\$',
8585
replace: 'window.jQuery',
8686
flags: 'i'
8787
}

0 commit comments

Comments
 (0)