These are chat archives for systemjs/systemjs

24th
Jun 2015
Cecchi MacNaughton
@cecchi
Jun 24 2015 03:31
@guybedford could you explain the reasoning behind this? https://github.com/systemjs/builder/blob/master/templates/sfx-core.js#L351-L353
What is the recommended way to bundle some modules, but load others lazily (i.e. over the network)? This would be valuable, for example, to load certain client-side templates that aren't needed right away.
Hans van den Akker
@mysim1
Jun 24 2015 08:31
@guybedford Did some debugging for you. I logged it in the system-builder project. systemjs/builder#212
Ev Dolzhenko
@dolzenko
Jun 24 2015 08:34
@guybedford thank you very much, need to read docs more carefully
Jayson Harshbarger
@Hypercubed
Jun 24 2015 09:51
I asked this a few days ago but didn't get an answer...
@Hypercubed
Does anyone know if SystemJS builder can combine two directory trees? For example I have a base/components directory and a myapp/components directory that get combined by browserSync (looks like one directory in browser).
Essentially I'm trying to keep a clean separation between the template project and my additions.
I hope the question is clear.
There seams to be a lib option in addition to baseUrl but as far as I can tell it is not used.
Guy Bedford
@guybedford
Jun 24 2015 11:39
@cecchi this is what normal bundling is for
Jayson Harshbarger
@Hypercubed
Jun 24 2015 12:10
I think webpack supports multiple roots.
Guy Bedford
@guybedford
Jun 24 2015 12:15
yeah we need a 1 - 1 correspondence in SystemJS, theres no concept of "lookup paths"
Jayson Harshbarger
@Hypercubed
Jun 24 2015 12:23
Is there a plan for this? Right now I copy all js from base (including all jspm components files) and overide directories to dist, then bundle. Needless to say this means a lot of extra work.
Nacho Álvarez
@nachoaIvarez
Jun 24 2015 12:31
I had this problem too @Hypercubed . You can checkout here an automated workaround
Jayson Harshbarger
@Hypercubed
Jun 24 2015 12:34
@nachoaIvarez thanks. looks similar to what I'm doing.
And thanks, as always, guy.
Jayson Harshbarger
@Hypercubed
Jun 24 2015 14:49
@nachoaIvarez i wonder if there is a way to delete js files after bundeling. Does builder generate a list of js files that were used?
Nacho Álvarez
@nachoaIvarez
Jun 24 2015 14:56
I remember Guy in the JSConf talking about that, modules mapped to their corresponding bundles. You should check it out. You can also do arithmetic bundles, maybe you can work it out that way.
David Babaioff
@dbabaioff
Jun 24 2015 15:07
hi guys, I have a question about SystemJs + babel - I generated all my ES6 file to use module system using babel - now which files I need to include to load the modules? only system.js? or es6-module-loader and systemjs-extension-register
Cecchi MacNaughton
@cecchi
Jun 24 2015 18:32
@guybedford makes sense, I guess I wanted something in between. It'd be nice to have a bundle that includes the full System API and my config. With the normal bundling I have 2 additional script tags (one for system.js and one for config.js). Of course I can concatenate those in a separate build step, but having that built into the builder or JSPM (not sure where it'd belong) would make sense, no? Or is my use-case uncommon?
Guy Bedford
@guybedford
Jun 24 2015 19:21
We're trying not to be prescriptive about the exact optimizations - a custom build step is generally encouraged
@cecchi ^
Rob Wormald
@robwormald
Jun 24 2015 19:53
I do think it would be useful to have a way to simply append stuff to the top of a bundle, but it's NBD to set up a gulp task to do so
Sharon (Sean) Rolel
@Mosho1
Jun 24 2015 22:44
I'm using babel transpliation through systemjs and pages are loading pretty slow
I could use a gulpfile to transpile separately but that would be a shame...
Rob Wormald
@robwormald
Jun 24 2015 22:47
well yeah, on the fly transpiling is (comparatively) slow
Sharon (Sean) Rolel
@Mosho1
Jun 24 2015 22:51
I'm thinking about some kind of caching
Rob Wormald
@robwormald
Jun 24 2015 22:54
you should transpile on the server for production
Sharon (Sean) Rolel
@Mosho1
Jun 24 2015 22:54
of course, talking about development