These are chat archives for systemjs/systemjs

3rd
Dec 2015
Davis Kim
@davis
Dec 03 2015 02:47
are loading systemjs projects in iframes fixed yet?
i still run into the security error on chrome
Tolis Christomanos
@chchrist
Dec 03 2015 09:17
Oh, s**t is this a known problem?
Maybe if I try to bundle sfx?
Guy Bedford
@guybedford
Dec 03 2015 10:16
@davis make sure you're running version 0.19.6
Gustav Nikolaj
@gustavnikolaj
Dec 03 2015 14:34
Anyone who have experience using coverage tools with SystemJS?
Every example I have found seems to be centered around using karma... I'd like something more low level
Peter Müller
@Munter
Dec 03 2015 14:41
We were planning to make a loader plugin for coverage annotations. But it seems that is put on ice for now
Gustav Nikolaj
@gustavnikolaj
Dec 03 2015 14:43
I'm currently playing around with running the tests in node.js. I have a patched version of mocha that works. But I don't really know how to make it able to instrument files. I was considering using the instrumenter from the isparta module (istanbul with babel, basicly) as a transpiler in System.js... I think that idea itself tells something about my situation ;-)
Peter Müller
@Munter
Dec 03 2015 14:44
isparta was our plan as well
Gustav Nikolaj
@gustavnikolaj
Dec 03 2015 14:45
I'll let you know if I have any luck. Are you running the tests in node or in phantom?
Peter Müller
@Munter
Dec 03 2015 14:46
node
Our fallback option is a full build step of all files with transpiling and coverage annotation, then run tests on the build artifacts
That would obviously only be useful for CI runs, not local development with individual tests
Gustav Nikolaj
@gustavnikolaj
Dec 03 2015 14:50
@Munter yep, it's too bad if we have to do that. that'd suck. Let's cross our fingers that we find a solution to it :-)
Peter Müller
@Munter
Dec 03 2015 14:50
We'll probably need to port that same solution into the requirejs world
Andrey Gubanov
@finom
Dec 03 2015 15:16

@michaelprescott

<head>
  <meta charset="utf-8">
  <title>PAGE TITLE</title>
  <link rel="icon" href="data:;base64,iVBORw0KGgo=">
  <script src="node_modules/systemjs/dist/system.js"></script>
  <script>
    System.config({
      transpiler: "babel",
      babelOptions: {
        optional: [
          "runtime"
        ]
      },
      map: {
        'babel': 'babel-core/lib/api/browser.js'
      }
    });
  </script>

</head>

Doesn't work for me. It throws Uncaught ReferenceError: require is not defined

@/all Does anybody know how to use babel 6 with Systemjs?
Andrey Gubanov
@finom
Dec 03 2015 15:30
In browser I mean
Scott Smith
@scottadamsmith
Dec 03 2015 17:56
Does anyone know if it is possible to use self executing bundles when there are some custom paths/maps to external CDNs? Currently, my bundle fails due to what I assume is the missing module from the CDN.
Jithin Emmanuel
@jithin1987
Dec 03 2015 19:59
Has anyone tried debugging system.js loaded es6 in FF ? While FF is able to show original es6 source files, it's unable to add any breakpoint.
Also on using debugger statement, I am not able to make head or tail on where FF is breaking.
Peter Müller
@Munter
Dec 03 2015 20:01
Source maps not correct?
Jithin Emmanuel
@jithin1987
Dec 03 2015 20:02
I think source maps are correct, Chrome is able to breakpoint correctly. In Chrome I can add breakpoint and it just works.
Either FF has some problem, or system.js is doing something weird
Also FF is showing these original files, just that I can't do any debugging with it.
Kirill Cherkashin
@kirjs
Dec 03 2015 20:36
If I defined an anonymous module, e.g. System.register([], function(exports_1) { .... do things }); is there a way to access it and start it?
Jordan Weitz
@newduke
Dec 03 2015 21:08
Hello. We are using defaultJSExtensions: true in our config and want to include a remote module "stripe": "https://js.stripe.com/v2/". System.js will try to add .js to this and look for https://js.stripe.com/v2/.js Is there a workaround? I think for the case of a path ending in / it should not attempt to add .js.
Davis Kim
@davis
Dec 03 2015 21:11
@guybedford ah got it, i'll need to upgrade. thanks!
Jordan Weitz
@newduke
Dec 03 2015 21:38
I am now using system-script plugin now for fixing the .js extension issue
BStenfors
@BStenfors
Dec 03 2015 22:50

I am trying to use a SFX bundle of all my modules. The bundle gets created successfully but when I try to implement the bundle I get the following error: "Uncaught ReferenceError: angular is not defined". I am not setting the format when I bundle the modules. I also only include the bundled .js file in my index.html file, not system.js, es6-module-loader or config.js. Any ideas or suggestions of what I am forgetting / doing wrong?

Here is my Gulp Task

gulp.task('deployStaticBundle', function(){
    var builder = new Builder('.', 'config.js');
    builder
        .buildStatic('app/app', 'app/lmsStaticBundle.js',
        {
            minify: false,
            mangle: false
        })
        .then(function() {
            console.log('Build complete');
        })
        .catch(function(err) {
            console.log('Build error');
            console.log(err);
        });

});

Here is my Index file

<!--<script src="jspm_packages/es6-module-loader.js"></script>-->
    <!--<script src="jspm_packages/system.js"></script>-->
      <!--<script src="config.js"></script>-->
    <script src="app/lmsStaticBundle.js"></script>
    <script>
//        System.import('./app/lmsStaticBundle');
        //dev: System.import('./app/app');
        //live System.import('./dist/app');
    </script>