These are chat archives for systemjs/systemjs

8th
Sep 2015
λex Vincent
@alexisvincent
Sep 08 2015 08:28

@guybedford To reiterate what was said above, ive overridden builder.loader.normalize and builder.loader.locate, my issue is that because the builder uses these loaders as well when it tries to resolve things like ‘fs’, I must return the standard node libs, but if a builder target tries to load fs it needs to return one of the browserify shims. Currently to just test the system im doing the following:

System.set(‘fs’, System.newModule(require(‘fs')))
System.set(‘util’, System.newModule(require(‘util')))

This advances the build process significantly, however it breaks when it encounters one of babels dependencies which requires(‘module’), since this is specific to the file.

So all in all I’m just not completely sure how to approch this.

λex Vincent
@alexisvincent
Sep 08 2015 08:39
Im also wondering about the significance of nodeRequire
λex Vincent
@alexisvincent
Sep 08 2015 12:50
I get the following build error when I import ’systemjs’
Build error
{ [Error: ENOENT, open '/Users/alexisvincent/Documents/Code/Projects/storm/docs/jspm_packages/npm/when@3.7.3/es6-shim/makePromise.js']
  errno: -2,
  code: 'ENOENT',
  path: '/Users/alexisvincent/Documents/Code/Projects/storm/docs/jspm_packages/npm/when@3.7.3/es6-shim/makePromise.js’ }
makePromise is in when@3.7.3/lib/ but notes6-shim
manually copying the files helps the build process along but I get the following error
[Error] TypeError: undefined is not an object (evaluating 'process.platform.match')
Sean G. Wright
@sgwatgit
Sep 08 2015 21:26

@anyone I'm attempting to use the systemjs builder in my gulp file for doing a production built of an app.

if i use the command line jspm bundle-sfx i can use the --inline-source-maps option, but what if i'm using builder.buildSFX('app/app', 'public/bundle.js', { ... options ... });

i noticed this issue jspm/jspm-cli#783 added the cli option for inline source maps - i was hoping there was a similar option for the systemjs-builder. does one exist?

Rob Wormald
@robwormald
Sep 08 2015 21:28
@sgwatgit the cli uses SystemJS builder, so i would think so
Sean G. Wright
@sgwatgit
Sep 08 2015 21:30

@robwormald i tried

builder.buildSFX('app/app', 'public/bundle.js'
                { minify: false, inlineSourceMaps: true });

but that didn't help

Rob Wormald
@robwormald
Sep 08 2015 21:30
i haven't actually checked tho
Sean G. Wright
@sgwatgit
Sep 08 2015 21:33
@robwormald yup, just saw that when trying to figure out what the cli option did. thanks - should have read more before asking.