These are chat archives for systemjs/systemjs

Jan 2016
Ali Salehi
Jan 13 2016 03:15

Hi guys, I am new SystemJs. I am trying to build up a sample code using typescript and systemjs (browser).

app.ts file : import {Person,add as test} from './testLib'

// is compiled to

app.js: var testLib_1 = require('./testLib');

when SystemJs executes app.js, it trys to load /js/testLib/ folder rather than /js/testLib.js file. Any ideas why ?

My tsconfig.js has

"target": "es5",
"module": "commonjs",

Patrick Walters
Jan 13 2016 04:25
@guybedford Starting to see some additional issues with the latest release of system 0.19.15 besides the bundling one, I'm not certain they are all 100% system.js issues but backing up to the previous version the issues go away. This could be some of the plug-ins that are in use in the app (such as karma-systemjs) so not sure exactly how to track down at the moment just mentioning
Jan 13 2016 08:38
Hi all, I use systemjs-builder to build js in angular2 app, what plugin need to build template?
Guy Bedford
Jan 13 2016 10:36
@jdanyow that's really excellent to see!
@PWKad sure I'll aim to have a look at the issues today
Jan 13 2016 11:28

i've got a problem when importing the "angular" lib. in a unit test written in Typescript +jasmine and running under karma (PhantomJS). I'm using the "system" as the "module" compiler option for TS so the result is like the following snippet :

System.register(["angular"], function(exports_1) {
    return {
            function (_1) {}],
        execute: function() {
            describe("A suite", function () {
                it("contains spec with an expectation", function () {

The karma console output says that i've got a TypeError: Unexpected anonymous System.register call.

if i remove the import "angular"; from the source then everything is fine (but i can't use any angular stuff)
Scott Smith
Jan 13 2016 12:38
@simonfox I just saw @guybedford mention this command to answer a similar question in JSPM. Check this out, it seems to be a way to ensure all instances of a given dependency resolve to a specific version.
Ron Zeidman
Jan 13 2016 12:50
Hi, how do I import a module that adds a variable to the global scope (var something = {} in the global scope) while also adds if (typeof exports !== 'undefined') exports = somethingElse. I'm interested in getting the "something" I don't care about the "somethingElse" (this is for "ag-grid" module but could probably be applied to other similar scenarios).
Scott Smith
Jan 13 2016 17:16
Not sure if anyone else has brought this up or if this indeed a way, but it would be nice if when an import is pulled in that you could somehow use an environment setting of sorts to tell it to import a .min.js equivalend of the file you are importing if it is available in the same location.
Guy Bedford
Jan 13 2016 20:54
@jdanyow well you can start working on that Promises performance PR now :P -
Jan 13 2016 20:55
Quick question...if I include a module in a bundle, and then load that bundle via <script src=...> and then sometime later call System.import on the same module, it shouldn't make a request for it correct? It should be cached, in a sense?
Jeremy Danyow
Jan 13 2016 20:56
@guybedford haha- I wonder if thats new
(the c version)
i don't see any setTimeout in there
Guy Bedford
Jan 13 2016 21:02
Dash.. a port of Bluebird to C perhaps?
Kind of amazing that it's a smaller piece of code than the smallest JS polyfill for promises out there.
Jan 13 2016 23:03
does anyone use karma with systemjs (and making it work) ?
with a working example :)
Sean Anderson
Jan 13 2016 23:19
i gotchoo
Simon Fox
Jan 13 2016 23:34
@guybedford sorry to bother you directly, I'm having some issues with a bundled app that don't appear unbundled....specifically with jquery usage I started to describe the issue :point_up: January 13, 2016 10:16 AM and haven't been able to get any further
I was going to try create a simple repro, but before I do just wondering if you could give me any tips on where to look specifically to see if I can't sort the issue myself...
I've got two packages that have a jquery dep, one is github:components/jquery and the other is npm:jquery both expect the same jquery version
I tried adding an override for bootstrap to tell it to use npm instead of github...but still seeing the problem.
Simon Fox
Jan 13 2016 23:40
Basically ms-signalr-client and bootstrap both extend jquery....and when unbundled both extensions are available on the instance I get when doing import $ from 'jquery' but when bundled, the ms-signalr-client extension is not there
it is available however on global jQuery
ms-signalr-clientuses window.jQuery when adding the extensions, I'm wondering if that could be a problem somehow?