0
例如CONFIG爲rest.js:如何配置SystemJS以自動加載軟件包相關性?
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,藍鳥等)。我有錯誤:
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等)