例如config for rest.js:
var config = {
map: {
'app': 'app',
'rest': 'node_modules/rest.js'
},
packages: {
'app': { main: 'main.js', defaultExtension: 'js' },
'rest': { main: 'index.js', defaultExtension: 'js' }
}
}
SystemJS成功加载rest.js,但rest.js具有依赖性(affirm.js,bluebird等)。我有错误:
GET http://localhost/request 404 (Not Found)
GET http://localhost/bluebird 404 (Not Found)
GET http://localhost/affirm.js 404 (Not Found)
GET http://localhost/extend 404 (Not Found)
如何配置SystemJS以从node_modules目录自动加载包依赖? (node_modules / request / index.js,node_modules / bluebird / zalgo.js等)