These are chat archives for systemjs/systemjs

30th
Jun 2015
reinholdk
@reinholdk
Jun 30 2015 06:35

I need to generate URLs relative to the current module to create a Web Worker or to determine the URL of a text resource. Using requirejs, i can do the following:

var workerUrl = require.toUrl("./Worker.js");
var worker = new Worker(workerUrl);

As a workaround, I have created a loader plugin called location:

export var instantiate = function(load) {
    return load.address;
}

but that's not really nice since import returns a Promise, I still have to know my own module name mymodule, and the module depends on the presence of the loader plugin.

System.import("mymodule/Worker.js!location").then(function(workerUrl) {
    worker = new Worker(workerUrl);
});

Do you have any better idea?

enlait
@enlait
Jun 30 2015 08:19
I'm not sure if it's a right place for builder questions, but could anyone direct me to an example of using systemjs-builder with babel?
Austin
@amcdnl
Jun 30 2015 12:21
how do you upgrade to the latst version of systemjs through jspm?
everytime i install i get v16
Austin
@amcdnl
Jun 30 2015 12:28
:)
nm - jspm dl-loader --edge