These are chat archives for systemjs/systemjs

12th
Mar 2015
Jon Stevens
@lookfirst
Mar 12 2015 00:27
Dave Ackerman
@dmackerman
Mar 12 2015 00:47
i'm getting an error that angular is trying to load twice, but I only import it once
:(
Dave Ackerman
@dmackerman
Mar 12 2015 17:08
how do I configure lodash to be global? I've got this in my config, but it doesn't seem to work.
  "meta": {
    "lodash": {
      "format": "global"
    },
    "restangular": {
      "deps": [
        "lodash"
      ]
    }
  }
});
Jon Stevens
@lookfirst
Mar 12 2015 17:10
I wouldn’t make anything global. I’d always use imports.
Dave Ackerman
@dmackerman
Mar 12 2015 17:11
what if a lib requires it? do I need to manually update the lib?
the dependency is already declared. when you jspm install rectangular, everything will get declared properly in your system.config
The ‘process’ is: jspm install npm:restangular that puts the config into your package.json and updates your system.config. map{}
you shouldn’t really need to edit your system.config by hand at all.
Dave Ackerman
@dmackerman
Mar 12 2015 17:27
oh, awesome
I think I just did jspm install restangular, didn't hook it up properly
Jon Stevens
@lookfirst
Mar 12 2015 17:29
that should work too. there is nothing to hook up.
it is automagical
all you need to do then is just import ‘restangular’ where it is needed and systemjs will follow the dependency chain to ensure that _ is populated before restangular is loaded.
Dave Ackerman
@dmackerman
Mar 12 2015 17:32
magic :smile:
Jon Stevens
@lookfirst
Mar 12 2015 17:32
that said, it does make me wonder what happens if you do this: import restangular; import _ from underscore; i suspect that there might be a conflict there since restangular depends on lodash and not underscore.
but regardless, don’t do that. ;-)
Dave Ackerman
@dmackerman
Mar 12 2015 18:02
doesn't appear that SystemJS is following the chain for _