I use string-replace-loader to replace assetspath both in html and js.
It works in html, but fails in js.
this is my code:
{ loader: 'string-replace-loader', options: { search: '"\/images\/', replace: '"' + config.publicPath + 'images/', flags: 'ig' } }