These are chat archives for systemjs/systemjs

10th
Jan 2015
Guy Bedford
@guybedford
Jan 10 2015 10:35
If react isn't writing onto the window, perhaps try:
window.react = require('react');
in your entry point
Joe Pea
@trusktr
Jan 10 2015 10:41
@guybedford WHere would the change for the default export be made? lib/extension-core?
Guy Bedford
@guybedford
Jan 10 2015 10:48
@trusktr I think in the register extension, there are quite a few concerns though so may not be an easy PR
Joe Pea
@trusktr
Jan 10 2015 11:16

@guybedford Found it. Adding


    if (exports.default)
        return exports.default

right after line https://github.com/systemjs/systemjs/blob/master/lib/extension-register.js#L347 works in my app, but I know it’s not the actual solution.

(in the previous lines it has to do with __useDefaults. Gotta figure that out.
)
Joe Pea
@trusktr
Jan 10 2015 11:24
I guess it would require detecting if the CJS file is requiring(‘a_module'), or requiring(‘a_module').something, and pass that info to the load mechanism, not just blatantly return the default if it exists. Is that a good guess?
Joe Pea
@trusktr
Jan 10 2015 11:35
Actually, that sounds like too much work. I think there might be another way.
Vildan Softic
@zewa666
Jan 10 2015 12:44
hi there ... anybody tried using Angular with System.JS?
works quite well except DI. simply cant get it to work
it seems as System.JS tries to intercept the calls from Angular and tells me that it can't find the reference of course
Vildan Softic
@zewa666
Jan 10 2015 13:25
ok got it working, sorry was just a stupid typo
Lars Francke
@lfrancke
Jan 10 2015 14:33

I saw a couple of references to loader Plugins (e.g. https://github.com/systemjs/systemjs#plugins and http://stackoverflow.com/questions/24923479/can-es6s-module-loader-also-load-assets-html-css) but I can't figure out what I need to do to get them working/installed. Missing piece of documentation :) Also missing seems to be an explanation about the exclamation mark that I see everywhere plugins are mentioned. When/why is that needed?

My actual use case is to load CSS & JS for views using Angular's ui-router in the resolve method (https://github.com/angular-ui/ui-router/wiki). Has anyone here any experience with that?

frerom
@frerom
Jan 10 2015 15:07
Hello! I just started looking at system.js and it seems nice. Recently I've tried out webpack and the 6to5-loader to use es6 features, jsx, loading css and so one. The one thing that system.js is providing that I miss is the actual System API. But I do have some questions. I'll start out with the system.js plugins. What does the ! do? What triggers the different plugins? On filename extension? Is it possible to configure this to trigger on different regex expressions for example like Webpack? Can you chain this, so if I want to use Stylus it could go through the stylus plugin and then the css plugin? So for too many questions but I'm really interested in this:)
Joe Pea
@trusktr
Jan 10 2015 18:39
@Ifrank
@lfrancke ^
Lars Francke
@lfrancke
Jan 10 2015 18:42
@trusktr Thanks. On my way out but I'll check it out later!
Looks interesting