These are chat archives for systemjs/systemjs

6th
Feb 2016
Kurt Westerfeld
@kwesterfeld
Feb 06 2016 03:39
Question: I am using SystemJS, actually really jspm. I have a stubborn module and companion that I have to load via System.import() manually. But I actually want to call System.import from an ES6 module. Currently, my app dies in the browser with ReferenceError on System. What’s the right way to import System?
cferrell
@cferrell
Feb 06 2016 20:07
I have a recurring problem that's probably more SystemJS related, but does have to do with jspm and config.js. I'm working on an aurelia application that is actually part of of bigger ASP.NET MVC application. Technically (if you're familiar with MVC) the aurelia app is an Area in this ASP.NET MVC application. The layout of the area needs jquery, so is loaded before any SystemJS stuff happens. Various jspm packages also have jquery as a dependency. Problems always seem to occur when a map entry of a package has a jquery dependency in it. I'm assuming because jquery is already loaded its wreaking havok with SystemJS. The typical error is $("foo").bar is not a function. If I take out the dependency in the map entry everything seems to be ok. The immediate/short term fix is to figure out how to tell jspm install not to put an entry in the packages dependency map entry for jquery. Because everytime I do a jspm install, it's re-adding that to the config.js But the more general concern is this problem that SystemJS seems to have with already loaded scripts. i'm probably not alone in that my aurelia application is a part of a bigger application that is not using SPA or SystemJS. Any ideas are appreciated. Hope nobody minds me cross-posting this to SystemJS
cferrell
@cferrell
Feb 06 2016 20:14
@kwesterfeld I'm using Aurelia for my app, so I load SystemJS via a script tag in my index file