These are chat archives for systemjs/systemjs

21st
Jul 2015
Jordan Weitz
@newduke
Jul 21 2015 00:06
Does systemjs use Relative identifiers? I am including minified code built for AMD which has `define("foo",["require"], function(require) {
require("./bar") }
if I specify the full path, i.e., `require("full/path/bar") it works, but complains that ./bar is a missing dependency
namely: Uncaught (in promise) Error: Module ./bar not declared as a dependency.
Davis Kim
@davis
Jul 21 2015 03:18
hey guys, how would i create 2 sfx-bundles, 1 that has some dependency, and one that doesn't?
or rather,
do you guys know of any way to make 2 different sfx-bundles that have conditional imports?
or what a good way to do that is?
i basically have a chunk of debug code that doesn't need to be deployed to production, and i was wondering what the best way to manage my code was. thanks!
Charles Patton Jr
@buddyp450
Jul 21 2015 11:50
Is this to load them on demand?
As-in you'd import your main bundle with core dependencies and then load the others as needed?
Oops, misread, so you want to have a bundle for production and a bundle for development... I think this is still appropriate: https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#bundle
Guy Bedford
@guybedford
Jul 21 2015 11:59
@davis patterns around this are still developing
I would suggest using something like https://github.com/systemjs/builder#adapter-modules actually
That is just using globals basically
Sharon (Sean) Rolel
@Mosho1
Jul 21 2015 12:44
Why does this work in webpack but not systemjs: import {Route} from 'react-router';
In webpack it reads as destructuring the default export, while in systemjs it's an export named Route
Jordan Weitz
@newduke
Jul 21 2015 18:17
@guybedford I could really use some help with systemjs relative identifiers. Can you please help me understand how systemjs 0.18 differs from requirejs in this regard (please see my previous comment)?