These are chat archives for systemjs/systemjs

27th
Apr 2017
Robert Collins
@robbiemu
Apr 27 2017 13:54
if anyone could help me with this I'd appreciate it: https://robbiemu.github.io/roguelike/ - this is, believe it or not, for a data visualization cert. :) I'm having trouble getting react-redux to load up with systemjs
Charles Patton Jr
@buddyp450
Apr 27 2017 13:57
I don't think your browser is going to understand your .jsx file, likely just need to make sure it's transpiled beforehand.
@robbiemu Just looked at your config, I think you still need to specify in the meta for your app that the loader for '*.jsx' files should be 'babel'
Robert Collins
@robbiemu
Apr 27 2017 14:02
@buddyp450 a version of this app without redux is working just fine :)
and there is already a transpiler: 'babel', in there -- I think that is what you are looking for?
it's been a while, but that's what I found in my jspm.config.js
not sure if you might need something similar to transpile your jsx
Robert Collins
@robbiemu
Apr 27 2017 14:06
@buddyp450 thanks, that was very nice of you to look up. I don't see how that would relate to react-redux specifically though
Charles Patton Jr
@buddyp450
Apr 27 2017 14:06
me either, but sometimes doing something (anything) helps me solve a problem
Robert Collins
@robbiemu
Apr 27 2017 14:06
and like I said, 2-3 git commits ago, before I added redux, the jsx was working just fine with my config.js
Charles Patton Jr
@buddyp450
Apr 27 2017 14:07
take out redux? ;)
there shouldn't be any difference, did you neglect to install it?
I don't use webpack
Robert Collins
@robbiemu
Apr 27 2017 14:08
:) these are all from unpkg -- I'm not installing anything atm. no webpack, no npm
Charles Patton Jr
@buddyp450
Apr 27 2017 14:10
oh okay just saw webpack in the console
Robert Collins
@robbiemu
Apr 27 2017 17:52
Im positive the issue is with react-redux.. I can use both react and redux separately without any issue (that's the current state of the app)
Charles Patton Jr
@buddyp450
Apr 27 2017 17:52
I believe you, I just haven't used unpkg before ever so I'm unfamiliar with the project structure that creates.
Robert Collins
@robbiemu
Apr 27 2017 18:03
@buddyp450 thanks .. that got me thinking maybe I can try another provider. Is there a way to get around CORS?
(index):1 XMLHttpRequest cannot load https://wzrd.in/standalone/react-redux@latest.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://robbiemu.github.io' is therefore not allowed access. The response had HTTP status code 502.
Charles Patton Jr
@buddyp450
Apr 27 2017 18:04
You got me there
Robert Collins
@robbiemu
Apr 27 2017 18:47
the problem is that it is automatically putting a .js at the end, even when I try to stop that with defaultExtension: false
Robert Collins
@robbiemu
Apr 27 2017 19:26
wow, I got it! gotta use main to specify a specific location without extension
System.config({
  transpiler: 'babel',
  map: {
    'react': '//unpkg.com/react@15.5.0/dist/react.js',
    'react-dom': '//unpkg.com/react-dom@15.5.0/dist/react-dom.js',
    'redux': '//unpkg.com/redux@3.6.0/dist/redux.js',
    'react-redux': '//wzrd.in/standalone/',
//    'chai': '//unpkg.com/chai@3.5.0',
//    'mocha': '//unpkg.com/mocha@3.3.0'

    'app': './app'
  },
  packages: {
    app: {
      main: './components/Game.jsx',
      defaultExtension: false,
    },
    'react-redux': {
      main: 'react-redux@latest',
      defaultExtension: false,
    }
  }
});
Charles Patton Jr
@buddyp450
Apr 27 2017 19:42
:clap:
Charles Patton Jr
@buddyp450
Apr 27 2017 23:33
So system-node-sourcemap was a nice idea but ultimately didn't work for me.