I am using webpack 3
& trying to use string replace loader.
This code use to work in webpack1.X
module: {
loaders: [
{
test: /fileName\.js$/,
loader: 'string-replace',
query: {
search: 'jQuery',
replace: 'window.$'
}
}
]
}
I have tried this as well:
module: {
loaders: [
{
test: /fileName\.js$/,
loader: 'string-replace-loader',
query: {
search: 'jQuery',
replace: 'window.$'
}
}
]
}
What do I need to do to ensure this loader works in webpack 3. There are no errors but string is not getting replaced in the target file.