These are chat archives for systemjs/systemjs

11th
Jun 2015
Hadrien Lanneau
@hadrienl
Jun 11 2015 13:54
hi
I need help to build my angular ES6 app
I'm using this skeleton : https://github.com/zewa666/angular_es6
I've tried to make systemjs-builder working but it doesn't :(
Austin
@amcdnl
Jun 11 2015 14:44
@gh
Hadrien Lanneau
@hadrienl
Jun 11 2015 14:57
oh thx I didn't tried this
Austin
@amcdnl
Jun 11 2015 15:00
it has its own special builder that uses system builder at core
it bundles automatically for u
Hadrien Lanneau
@hadrienl
Jun 11 2015 15:30
ok I've been able to create a bundle.js file
but now I have a strange error :
Uncaught TypeError: System.import is not a function
it's from a decorator function :
function register(opts) {
    return function decorate(target) {
      return System['import']('angular').then(function () {
Guy Bedford
@guybedford
Jun 11 2015 15:32
@hadrienl sfx bundles do not support dynamic imports
Hadrien Lanneau
@hadrienl
Jun 11 2015 15:32
ah ok
Hadrien Lanneau
@hadrienl
Jun 11 2015 15:40
hm…
I've tried a workaround by setTimeouting the decorate function if my module is not already loaded,
it works on dev, but when bundled, it doesn't…
Austin
@amcdnl
Jun 11 2015 16:08
Hmm I'm using it now, prob a revision change
log a bug plz
rojaro
@rojaro
Jun 11 2015 16:09
@guybedford ... can you please provide an example how to conditionally load the Intl polyfill if the browser has no Intl support?
Hadrien Lanneau
@hadrienl
Jun 11 2015 16:28
I've tried replace System.import by a try {angular.module('app')}catch() {timeout the function}
it work in dev mode, but then, when bundled, it register the controller too late
Brian Feister
@brianfeister
Jun 11 2015 16:43
Question jspm install github:angular/bower-material --save fails to get it's peer dependency angular/bower-angular it seems like this could be a repo availability problem, I get the following error warn Timed out on lookup for github:angular/bower-angular, retrying (3).
Austin
@amcdnl
Jun 11 2015 16:57
@brianfeister i had the same issue
jspm install npm:angular
now
as well as the rest of the stuff
Brian Feister
@brianfeister
Jun 11 2015 16:57
ah, sweet! trying now
Austin
@amcdnl
Jun 11 2015 16:57
u can look at my grid for a reference
Brian Feister
@brianfeister
Jun 11 2015 16:58
same for angular-material?
Austin
@amcdnl
Jun 11 2015 17:03
haven't tried
Austin
@amcdnl
Jun 11 2015 17:38
Anyone got a open source project that is building with systemjs an output module?
Brian Feister
@brianfeister
Jun 11 2015 17:39
not that I'm aware of at the moment
I'm sure the answer to the question is technically "yes", but I'm not aware
Maeoll Kim
@abyss-outpost
Jun 11 2015 22:22
Hi, i’m trying to create a AngularJS/RequireJS/SystemJS hybrid boilerplate but i can’t seem to find the require.config function? Is it not imported to SystemJS?
Maeoll Kim
@abyss-outpost
Jun 11 2015 22:31
here’s what i did:
window.require = window.requirejs = System.amdRequire;
console.log(require);
require.config('/scripts/configuration/confrequire');
Rob Wormald
@robwormald
Jun 11 2015 23:07
seems like you'd want to use System.config there
@amcdnl i've got a couple in progress, what were you looking for
Austin
@amcdnl
Jun 11 2015 23:08
links?
still a bit of WIP, but mostly works. can either build a single bundle, or lib bundle and an app bundle, or minified versions of those
Austin
@amcdnl
Jun 11 2015 23:39
Nice ! Thanks for sharing
Rob Wormald
@robwormald
Jun 11 2015 23:39
the outstanding issue is that SystemJS + TS don't support single file bundling, so i'm doing TS -> ES6 and then using babel to bundle
Austin
@amcdnl
Jun 11 2015 23:39
i have a open source library that uses systemjs that I'm trying to figure out the best way to package it for external usage
Rob Wormald
@robwormald
Jun 11 2015 23:40
suppose it depends who the expected consumer is. i reckon JSPM users will just want raw ES6, npm users would want cjs
Austin
@amcdnl
Jun 11 2015 23:41
are you running all ur jspm packages thru a compiler??
Rob Wormald
@robwormald
Jun 11 2015 23:45
if i'm building an app, yes, they all get bundled
distributing a library, like i said, kinda depends