Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RequireJS: retry on script loading timeout

I have a very huge script and sometimes require.js can't load it and throws a load timeout error.. Can requireJS make a retry? Or can it be performed in another way?

like image 253
champion Avatar asked May 23 '26 15:05

champion


1 Answers

Try adding:

waitSeconds : 0

To your require.config object. This will set the time out on require to infinity.

You could adjust this figure based on your actual time out.

http://requirejs.org/docs/api.html#config-waitSeconds

like image 68
rjmacarthy Avatar answered May 25 '26 05:05

rjmacarthy