Require.js for 404 how to do fault-tolerant processing of resource files.

introduce the resource file with require.js, but the file will have a state of 404.

clipboard.png

clipboard.png

require.js onScriptError

clipboard.png

after reading the require.js documents, it seems that there is no fault tolerance in this respect. Ask God for advice


you have this problem for a long time. This kind of uncaught error is difficult to capture, and the link
https://codeshelper.com/q/10.
is also the same problem, but I haven't seen many of them that can really be solved.

this link says a way, but it is not easy to implement. You need the server to set cross-domain permission and so on. Write crossorigin
https://blog.csdn.net/github_.

in the tag.
Menu