Perhaps you could try this configuration at SystemJS level:
System.config({
(...)
map: {
lodash: 'node_modules/lodash/lodash.js'
},
meta: {
lodash: { format: 'amd' }
}
}
In a TS file, you can then use it as described below:
import _ from 'lodash';
_.forEach([1,2,3], function(e) {
console.log(e);
});
This issue could help you: https://github.com/systemjs/systemjs/issues/951.
Thierry
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…