Closed bankimatglobant closed 3 years ago
@bankimatglobant
sorry for the delayed reply. i would recommend to add flags: 'g'
to query and see what happens. without this flag it may be replacing only first occurrence (RegEx features)
This worked for me. I wasn't sure why it wasn't doing anything, even though I didn't think there was more than one occurrence, but adding this flag meant there must have been a match somewhere that I couldn't see.
@limitlessloop thanks for posting, glad it helped you out. i assume i can close this thread now
I am unable to use this. I want change assets path in generated js file in build. Please provide me detail steps to implement this.
Currently, I have added below code in webpack.dev.js file.
module: { loaders: [ { test: /.*/, loader: 'string-replace', query: { search: 'locales', replace: 'bankim', }, exclude: /node_modules/ } ],
And use npm install --save-dev string-replace-loader
Let me know if I miss something.