User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/18.104.22.168 Safari/537.36
Steps to reproduce:
Hi I'm front-end developer and I'm working on react.js based app - we've implemented lazy-loading with retries functionality based on this article and I've found out that there's different behaviour on firefox when it is compared to working properly Chrome.
Basically how the lazyWithRetries functionality works - if we fail to load dynamic lazy module - for loop starts - it takes error.message property and extracts URL of the module, in chrome this error looks like this:
"stack": "TypeError: Failed to fetch dynamically imported module: http://localhost:3000/assets/LazyComponent-03ed4069.js",
"message": "Failed to fetch dynamically imported module: http://localhost:3000/assets/LazyComponent-03ed4069.js"
Then after URL is created, we're adding timestamp to search params - just to deal with browser caching unloaded properly module.
Unfortunately for firefox here's how error looks like:
"message": "error loading dynamically imported module"
So creating the URL from message property is impossible.
I'd like firefox to return either URL of file that failed in error message or return file in fileName property, it would be much more readable error response and something can be done with it. For now it is impossible to retry with another request when lazy module is loaded so experience of users in web-apps can be worse than in chrome.