问题
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