These are chat archives for systemjs/systemjs

31st
Jul 2015
Dave Ackerman
@dmackerman
Jul 31 2015 13:15

hey guys. how are sourcemaps supposed to work with bundles? I’m using the builder directly in a gulp process, and I have something like:

        builder.config({
            baseURL: paths.prodDir,
            inject: false,
            sourceMaps: true,
            buildCSS: false,
            seperateCSS: false
        });

But I’m not seeing sourcemaps being generated. Any ideas?

Dave Ackerman
@dmackerman
Jul 31 2015 14:03
I always tried passing it into builder.build({ … }) but I get Unknown option: sourceMaps
Charles Patton Jr
@buddyp450
Jul 31 2015 14:14
For some reason after my bundle step I'm still getting http requests for my resources... where should I look for the bundle failure or the cause of it?
Dave Ackerman
@dmackerman
Jul 31 2015 14:18
I just upgraded SystemJS to 0.17 and the builder to 0.12, now my bundle doesn’t even get created :rage:
Charles Patton Jr
@buddyp450
Jul 31 2015 14:18
I feel your pain, I've been trying to nail down my production workflow for at least two weeks.
I finally settled on bundling SFX and then found out that dynamic imports weren't supported for SFX.
Dave Ackerman
@dmackerman
Jul 31 2015 14:19
just trying to get sourcemaps working
Charles Patton Jr
@buddyp450
Jul 31 2015 14:19
Which is a requirement of my app.
Dave Ackerman
@dmackerman
Jul 31 2015 14:19
what’s the advantage of SFX?
Charles Patton Jr
@buddyp450
Jul 31 2015 14:19
I wish I knew, lol.
It worked for my purposes because the bundle didn't even bundle the normal way.
Dave Ackerman
@dmackerman
Jul 31 2015 14:20
lolz
Charles Patton Jr
@buddyp450
Jul 31 2015 14:20
When I bundle normally it's like it's not bundled at all, I still see all my http requests.
Dave Ackerman
@dmackerman
Jul 31 2015 14:20
this used to work for me, now it doesn’t.
gulp.task('bundle', function(cb) {
    gutil.log(gutil.colors.magenta('Bundling JSPM packages from system.config.js -> bundle.js'));
    builder.loadConfig('./build/app/system.config.js').then(function(response) {
        builder.config({
            baseURL: paths.prodDir,
            inject: false,
            sourceMaps: true,
            buildCSS: false,
            seperateCSS: false
        });

        return builder.build('app/app.module', 'build/app/bundle.js', {
            minify: true,
            mangle: true
        })
        .then(function() {
            gutil.log(gutil.colors.green('✓ Production bundle complete!'));
            cb();
        });
    }, function(error) {
        gutil.log(gutil.colors.red(error));
        cb();
    });
});
Charles Patton Jr
@buddyp450
Jul 31 2015 14:22
Where exactly does it breakdown?
Like it doesn't create the bundle.js at all?
Dave Ackerman
@dmackerman
Jul 31 2015 14:22
yeah. no file gets created, no error thrown
I’m thinking I forgot to add something to my config when I upgraded to 0.17
it looks like it just exits immediately.
Charles Patton Jr
@buddyp450
Jul 31 2015 14:24
shrug I might as well be staring into the human brain.
with no error messages that must be rough, maybe missing an error handler somewhere?
Dave Ackerman
@dmackerman
Jul 31 2015 14:25
hmm. seems like loadConfig() is returning undefined.
baseURL is no longer implemented. It can be replaced by wildcard paths - System.paths['*'] = '/path/*’
probably a culprit there somewhere :)
Dave Ackerman
@dmackerman
Jul 31 2015 14:37
maybe it’ll work with the JSPM CLI
HA, it works. and source maps work too.
shrugs