如果我将我的路径配置指定为远程 url,它们可以正常加载。
require.config({
paths: {
jquery: '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min',
underscore: '//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min',
backbone: '//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min',
mustache: '//cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min'
}
})
如果我将它们移动到这样的本地文件:
require.config({
paths: {
jquery: 'libs/jquery-min',
underscore: 'libs/underscore-min',
backbone: 'libs/backbone-min',
mustache: 'libs/mustache-min'
}
})
然后它尝试将它们加载为libs/jquery-min.map
. 我似乎无法弄清楚为什么它会附加.map
扩展名。有任何想法吗?