Q: Trouble importing lodash with systemjs from compiled typescript How would one go about properly configure systemjs to load an external library?
I have created a typescript app that has some code that is shared between client/browser and server/node. A part of this code imports the lodash library, located in node_modules/lodash, this works fine in the server environment but breaks in the client.
I have simplified the class that loads lodash into
import * as _ from 'lodash';

export class LodashLoadTest {
    public constructor() {
        console.log(_.VERSION);//Outputs correctly in server compiled, but yields undefined in the browser
    }
}

The system.js config file looks like
(function (global) {
  System.config({
    // map tells the System loader where to look for things
    map: {
      // our app is within the app folder
      app: '/static/js/build',
      lodash: '/node_modules/lodash/lodash.js'
    },
    // packages tells the System loader how to load when no filename and/or no extension
    packages: {
      app: {
        main: './client/app.js',
        defaultExtension: 'js'
      }
    }
  });
})(this);

The difference between the server and client tsconfig.json files are as follows
Client:
"target": "ES5",
"module": "system",

Server:
"target": "es2015",
"module": "commonjs",

The lodash.js file is requested by the browser successfully, but seems to be loaded incorrectly by the systemjs loader. (With my limited knowledge and a quick look in the chrome devtools it seems like its loading it as a module, but how would I tell it to/manually convert this into the lodash object that LodashLoadTest expects?)
