I had the same problem, and the only fix also for me was to update the limit in webpack.config.js as @Jacek suggested.
I noticed that the ajax-loader.gif is 4,178 bytes so you can increase the limit in webpack.config.js just a bit, I tried with 4180 and it works.
@mmirus in another post said
so I don’t think that increasing the limit just a little bit is a bad solution, but I would be good to have an expert opinion on this. (because it seems strange that a 4,178 bytes gif cause this problem)