These are chat archives for systemjs/systemjs

1st
Apr 2016
Guy Bedford
@guybedford
Apr 01 2016 06:52
@KamelJabber the defaultJSExtensions: true configuration option would need to be set before adding the bundle script tag itself
KamelJabber
@KamelJabber
Apr 01 2016 10:52
@guybedford ah! thanks
Jason Vendryes
@jvendryes
Apr 01 2016 14:55

Looking for a little help with SystemJS, I've loaded a module via NPM: npm install angular2-grid, in System.config, I'm doing: map: { 'angular2-grid': '../node_modules/angular2-grid/dist/NgGrid.js' } and than in my TS file, I'm doing: import {NgGrid, NgGridItem} from 'angular2-grid';, when the page loads I simply get this error: angular2-polyfills.js:332 Error: SyntaxError: Unexpected token <

My node_modules folder lives a directory above the file that has my System.config, what am I missing or did I botch this entirely?

Yannick
@LPalmito
Apr 01 2016 14:59
I had more or less the same issue, try that instead of your map in the config:
paths: {
      'angular2-grid': 'node_modules/angular2-grid/dist/NgGrid.js',
},
Jason Vendryes
@jvendryes
Apr 01 2016 15:00
Same result
node_modules lives a directory above the file that loads my system.config
Is it possible that it can't get to that route?
Peter Müller
@Munter
Apr 01 2016 15:00
Where is your web root?
Jason Vendryes
@jvendryes
Apr 01 2016 15:36
@Munter I'm using Gulp to output to a directory in /dist/vendor/
Peter Müller
@Munter
Apr 01 2016 15:37
Then the config file should point there
Jason Vendryes
@jvendryes
Apr 01 2016 15:38
So I updated to: 'angular2-grid': 'vendor/NgGrid.js'
Same fail
@Munter If I set my TS file to: import {NgGrid, NgGridItem} from 'vendor/NgGrid.js'; it works, it's the 'alias' that fails
This message was deleted
This message was deleted
Jason Vendryes
@jvendryes
Apr 01 2016 15:45
GOT IT nevermind
Jason Vendryes
@jvendryes
Apr 01 2016 16:16
thank you all for your help
Gregg Roemhildt
@roemhildtg
Apr 01 2016 20:44
So it seems that the AMD plugin format is path/to/plugin!path/to/file.css Is there an anyone who has an example of a plugin that converts this path to the systemjs plugin format? It seems like a simple problem, but it would be helpful to have someone point me in the right direction.
Peter Müller
@Munter
Apr 01 2016 21:25
System.config([ pluginFirst: true })
Martin Lepadusch
@m4r71n
Apr 01 2016 21:39
This message was deleted
Michael Chavez
@bigbassroller
Apr 01 2016 23:18

I am wondering if jspm/systemjs can replace the need for browserfy?For example, in my package.json file, I am using browserify to tell the app to use different files for the client and server:

….
  "browser": {
    "./src/lib/index.js": "./src/lib/index.client.js",
    "./src/options.js": "./src/options.client.js"
  },
…..

I am thinking something like this could work:

      map: {
          "./src/lib/index.js": "./src/lib/index.client.js",
          "./src/options.js": "./src/options.client.js"
      },