These are chat archives for systemjs/systemjs

12th
Jan 2016
Jayson Harshbarger
@Hypercubed
Jan 12 2016 00:46
Boudewijn van veen
@bsvveen
Jan 12 2016 08:08
@Hypercubed thanks i will try that
Boudewijn van veen
@bsvveen
Jan 12 2016 10:13
@Hypercubed @guybedford .. it works i can debug aurelia en angular typescript in visual studio, thanks for your help.
Boudewijn van veen
@bsvveen
Jan 12 2016 10:44
however the config now looks like this: paths: { "welcome": "src/pages/welcome"},meta: { "welcome": { scriptLoad: true, format: "global", exports: "Welcome" }}. So for each file i have to specify this. Can i do this in some other way?
thomas
@eilgin
Jan 12 2016 17:00
I'm using jasmine combined with typescript and jspm but i can't get a working unit test run. I've included the system libs in my karma.conf.js but now i've got another error :
Uncaught TypeError: Unexpected anonymous System.register call.
does anyone have a suggestion?
Ashley Grant
@AshleyGrant
Jan 12 2016 17:02
I've got a question about how System.import works when inside a dependency.
Say I've got an app that has child-dep as a dependency. child-dep depends on grandchild-dep
If I run System.import('grandchild-dep').then(...) from within child-dep, SystemJS doesn't know how to load the module
import {Foo} from 'grandchild-dep'; would work
Ashley Grant
@AshleyGrant
Jan 12 2016 17:57
Apparently my problem is solved through repeated calls to System.normalizeSync, though __moduleName works, but only if I'm using ES6 modules, which doesn't really work for me since I have to support back to IE9
Is there an alternative to __moduleName for AMD or System.register formats?
Guy Bedford
@guybedford
Jan 12 2016 18:26
@AshleyGrant in CommonJS you can use module.id and in AMD you can do define(['module'], function(module) {module.id}).
it's a format-specific thing
Urban Lavbič
@xban1x
Jan 12 2016 19:28
If loading a bundle, ensure all the System.register calls are named.
What is this error??
How to solve it ?
Simon Fox
@simonfox
Jan 12 2016 21:16
I'm having some issues with jQuery imports in an Aurelia app and wondering if anyone can help....
"bootstrap": "github:twbs/bootstrap@3.3.6",
"jquery": "npm:jquery@2.2.0",
"ms-signalr-client": "npm:ms-signalr-client@2.2.2",

...

"github:twbs/bootstrap@3.3.6": {
      "jquery": "github:components/jquery@2.2.0"
},
"npm:ms-signalr-client@2.2.2": {
      "jquery": "npm:jquery@2.2.0"
}
Above is the relevant section of my jspm config
I have a module where I want to use signalR (provided by the ms-signalr-client module)
so I have the following imports in that module
import $ from 'jquery';
import 'ms-signalr-client';
problem is, when I do $.hubConnection, I get TypeError: o.hubConnection is not a function (this is bundled and minified hence o.hubConnection and not $.hubConnection and it is only in the bundled version that I see the problem)
Simon Fox
@simonfox
Jan 12 2016 21:21
so it looks like I'm getting different jquery instances somehow?
Urban Lavbič
@xban1x
Jan 12 2016 21:26
I got no idea dude.
I still don't get it why systemjs breaks down when i run it on linux and when i run it on windows it works :S
Scott Smith
@scottadamsmith
Jan 12 2016 21:28
from what I can tell it looks as though bootstrap being from github is resulting in it being pulled from there and signalr is pulling from npm. That said, since your jquery mapping is from npm, that is what you should be getting when you import jquery.
I haven't got my app built out to the point where I would have collissions like this. Maybe you will need to do an override on one of them to ensure they use a single dependency?
Simon Fox
@simonfox
Jan 12 2016 21:33
@scottadamsmith cool thanks, I started looking at overrides but need to learn more...do you have any tips or places to look for a good description of what I might need to do in terms of an override for this situation?