requirejs and async timeout error

ε祈祈猫儿з 提交于 2019-12-12 04:18:30

问题


I've referenced the solution here but it doesn't seem to work for me no matter what I do the script just doesn't load: Load async resource with requirejs timeout

This is what I have:

(function () {
    require.config({
        paths: {
        async: '/dist/async',
     }
});
require(["gapiModule"], function (gapiModule) {

);
})();

// gapiModule
define(['async!https://apis.google.com/js/client.js!onload'], function () {
    console.log('google client added');
   }
);

No matter what I try I get a script timeout error, any ideas? Thanks very much

来源:https://stackoverflow.com/questions/19909377/requirejs-and-async-timeout-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!