These are chat archives for systemjs/systemjs

21st
May 2015
Jon Stevens
@lookfirst
May 21 2015 00:00
If I import 'babel/browser-polyfill’; at the top of my app, I’m getting a lot of 404’s. What is the right way to include core-js support?
Paul Irish
@paulirish
May 21 2015 03:49
@guybedford the ember guys have sought similar sponsorship contracts and been successful with it since early on. I can intro you to Tom if you want any tips on making it work. Regardless I want to help make sure you get PAID. so ping me when i can help megaphone the message. :)
Dominic Chambers
@dchambers
May 21 2015 08:54
@guybedford, regarding the Zebra striping, I too would find it really useful to know a little more about that. In particular, where that zebra striping takes place (I assume internally within the ES6 Module Loader), since by looking at a bundle created with JSPM, I see a series of System.register() invocations, but it's not particularly clear to me whether any striping has occurred, nor can I see any obvious indication that ES6 modules are being distinguished from non-ES6 modules?
Benja Osuna
@benjasHu
May 21 2015 10:23
Hi everyone! There is some tutorial or repo using SystemJS with Gulp configuration? I've searched and found some but without any clearly explanations... thanks!
Nelo Mitranim
@Mitranim
May 21 2015 10:38
@benjasHu Here's a tutorial that includes this: http://mitranim.com/thoughts/next-generation-today/
Benja Osuna
@benjasHu
May 21 2015 10:42
@Mitranim thanks! I'll check it out!
Guy Bedford
@guybedford
May 21 2015 10:57
@lookfirst it is advisable to use core-js directly via jspm install core-js and import 'core-js/shim'
@dchambers yes it is in the implementation of the module loader and also in the implementation of System.register. There is a subtle distinction between System.register of 4 arguments and 3 arguments which represent non-ES6 and ES6 respectively. For clarity this is being changed in the next version to System.register and System.registerDynamic. In terms of the algorithm itself, it's just separating the dependency graph into phases of ES6 / non ES6, but can be a little difficult to explain in detail without a nice big visual of the dependency graph.
Dominic Chambers
@dchambers
May 21 2015 13:39
Ah, yes, I see that now. The ES6 modules don't pass true as their third argument, in addition to having a function signature of (_export) instead of (require, exports, module).
Given that System.register() is also overloaded in terms of the first parameter, which signifies whether it's a named or anonymous register, I can see why you might introduce a separate System.registerDynamic() method.
Jon Stevens
@lookfirst
May 21 2015 17:28
@guybedford What is the point of the babel polyfill then? Why doesn’t that work too?
ProgrammerWithoutaName
@ProgrammerWithoutaName
May 21 2015 17:54
babel polyfill fills in the stuff like Array.prototype.find()
Jon Stevens
@lookfirst
May 21 2015 17:55
@ProgrammerWithoutaName except it doesn’t work to include it. lots of 404 errors.
ProgrammerWithoutaName
@ProgrammerWithoutaName
May 21 2015 18:26
Odd
Guy Bedford
@guybedford
May 21 2015 19:37
@lookfirst the Babel polyfill file is a browserified version of core-js combined with regenerator
it is much better to load the packages directly
by using the included runtime transformation mode (the babelOptions: { optional: ['runtime'] } added by default), or by manually installing core-js / regenerator
to load it on its own, it would need to be added to the shim in the Babel override
don't want to encourage that though
Jon Stevens
@lookfirst
May 21 2015 23:54
i’m using babelOptions: { optional: ['runtime'] } in my config.js. that doesn’t make String.prototype.startsWith work though.