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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -