string replace loader not working with webpack 3 -


i using webpack 3 & trying use string replace loader.

this code use work in webpack1.x

module: {     loaders: [       {         test: /filename\.js$/,         loader: 'string-replace',         query: {           search: 'jquery',           replace: 'window.$'         }       }     ]   } 

i have tried well:

module: {         loaders: [           {             test: /filename\.js$/,             loader: 'string-replace-loader',             query: {               search: 'jquery',               replace: 'window.$'             }           }         ]       } 

what need ensure loader works in webpack 3. there no errors string not getting replaced in target file.

have tried adding flags: 'g' query option:

query: {     search: 'jquery',     replace: 'window.$'     flags: 'g' } 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -