These are chat archives for systemjs/systemjs

20th
Apr 2016
Cody Lindley
@codylindley
Apr 20 2016 00:01
@guybedford
you here?
Jayson Harshbarger
@Hypercubed
Apr 20 2016 10:58
Hello again @guybedford, I'd really appreciate if you can take a look at this: https://github.com/Hypercubed/jspm-union-poc . I think we may have talked about this before but I don't recall if your answer was no or maybe. :smile:
I'd also like to hear from others if they think this is a decent idea. Thanks.
Juan Lucha
@Ravencrow
Apr 20 2016 17:31
Hello there!
I'm trying to use this library in my angular2 project, but... it seems it hasn't the correct module format: https://github.com/fannarsh/country-list
I'm using systemJs and this is my configuration:
<script>
      System.config({
        packages: {
          app: {
            format: 'register',
            defaultExtension: 'js'
          },
          'node_modules/country-list': {
            format: 'cjs',
            defaultExtension: 'js'
          }
        }
      });
      System.import('app/app')
            .then(null, console.error.bind(console));
    </script>
The error I'm getting in my browser's console is: country-list.js:3 Uncaught ReferenceError: require is not defined
The line of this library throwint this error is:
var data = require('./data.json');
Juan Lucha
@Ravencrow
Apr 20 2016 17:38
I don't really know how to solve this, as I need to use this library...