0
我正在爲systemjs的映射路徑苦苦掙扎。子目錄的SystemJS軟件包配置路徑圖
以下是我目前的配置。 我想@angular-redux/form/dist/source/connect
是 @angular-redux/form/dist/source/connect/index.js
但它一直引導到 @angular-redux/form/dist/source/connect.js
我假設我不寫正確的地圖或我應該使用元,而不是... 可能有人走到我通過?
'use strict';
/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function() {
System.config({
paths: {
// paths serve as alias
'npm:': '../node_modules/'
},
// map tells the System loader where to look for things
map: {
"@angular-redux/form": "npm:@angular-redux/form"
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
'@angular-redux/form': {
main: 'dist/source/index.js',
map: {
'./connect': './connect/index.js',
'./connect-array': './connect-array/index.js'
}
}
}
});
})(this);
工作就像一個魅力。謝謝 –