Libraries loaded multiple times
Closed this issue · 1 comments
srtonz commented
I noticed that the config below (for v1.7) causes bootstrap.min.js to be requestes from both CDNs. Not sure if I'm making a mistake or not?
jquery.min.js 200 ajax.googleapis.com script fallback.min.js:8 29.3 KB 58 ms
bootstrap.min.js 200 cdnjs.cloudflare.com script fallback.min.js:8 10.0 KB 67 ms
bootstrap.min.js 200 maxcdn.bootstrapcdn.com script fallback.min.js:8 12.0 KB 321 ms
fallback.load(
{
'jQuery': [
'//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js',
'//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js'
],
'bootstrap': [
'//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js',
'//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js',
],
},
{
shim: {
'bootstrap': ['jQuery']
}
}
);
srtonz commented
it seems the reason is that fallback checks for a window object named 'bootstrap' which isn't defined by bootstrap.min.js