These are chat archives for systemjs/systemjs

6th
Sep 2016
Jeff
@Jefftopia
Sep 06 2016 16:55
@cristian-eriomenco I'm not sure what you are asking in your first question. The configuration file, which is used in your index.html file, is used at run time to resolve dependencies. In that sense, it's 'magic'. The import statements used in your source trigger lookups using map and other settings.
@cristian-eriomenco point your config at the "right" source directory using baseUrl.
buddyackerman
@buddyackerman
Sep 06 2016 17:32
I just updated to RC6 and I tried using the systemjs.config here and added additonal packages used by my app to the map property but I'm receiving the error Unexpected token when my app tries to load.
Davis Kim
@davis
Sep 06 2016 19:05
when writing systemjs plugins and using the translate hook
is it best to mutate load.source or return something from translate?
(or both?)
Abide Masaraure
@abidmix
Sep 06 2016 20:48

Hi gitters. I am trying to import an html template as a string in my angular 2 app. I have created an ambient module

/* import all html files as strings */
declare module "*.html" {
    var __html__: string;
    export default __html__;
}

, and can drill down to the imported file without compile errors but on runtime the exported template is not found.

Upon transpilation , the js code looks like this

var ActivityDla_html_1 = require('/Template/activity/ActivityDla.html');
ActivityDlaComponent = __decorate([
        core_1.Component({
            selector: 'activities-dla',
            template: ActivityDla_html_1.default
            providers: [dlas_model_1.DlaSModel]
        }), 
        __metadata('design:paramtypes', [educator_service_1.EducatorService, core_1.ElementRef])
    ], ActivityDlaComponent);
    return ActivityDlaComponent;

And am getting an SystemJS Unexpected token < error. I have created a plunker to reproduce
http://plnkr.co/edit/w20K9s?p=preview

Tom Davidson
@tomdavidson
Sep 06 2016 22:22
Hello, I would like to load a remote module from and s3 bucket, using s3 and not http - s3://bucket/key. I would need to create a systemjs plugin with a custom fetch()?
Peter Müller
@Munter
Sep 06 2016 22:24
Or you could use the csp version which uses script tag loading I think
Tom Davidson
@tomdavidson
Sep 06 2016 22:25
ps intended for nodejs