Skip to content

Commit 3203e05

Browse files
Reshetnikov_ASReshetnikov_AS
Reshetnikov_AS
authored and
Reshetnikov_AS
committed
Update README.md
1 parent 73c54e7 commit 3203e05

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,31 @@ module.exports = {
8787
}
8888
```
8989

90+
### Strict mode replacement:
91+
92+
You can set strict mode to ensure that the replacement was done:
93+
94+
In your `webpack.config.js`:
95+
96+
```javascript
97+
module.exports = {
98+
// ...
99+
module: {
100+
loaders: [
101+
{
102+
test: /fileInWhichJQueryIsUndefined\.js$/,
103+
loader: 'string-replace',
104+
query: {
105+
search: 'jQuery',
106+
replace: 'window.$',
107+
strict: true
108+
}
109+
}
110+
]
111+
}
112+
}
113+
```
114+
90115
## Contributing:
91116

92117
Feel free to open issues to propose stuff and participate. Pull requests are also welcome.

0 commit comments

Comments
 (0)