peter-mouland / react-lego

React-lego : incrementally add more cool stuff to your react app
http://react-lego.herokuapp.com/
MIT License
414 stars 36 forks source link

Error trying to do run start:dev on svg-isomorphic-loader branch #22

Closed ngoctranfire closed 8 years ago

ngoctranfire commented 8 years ago
 lego: Environment: { DEBUG: 'lego:*', NODE_ENV: 'development', PORT: '3000' } +0ms
  lego: server-entry ReferenceError: React is not defined
    at Object.<anonymous> (/Users/ngoctranfire/Desktop/react-lego/src/app/containers/Game/assets/chevron.svg:1:1)
    at Module._compile (module.js:541:32)
    at loader (/Users/ngoctranfire/Desktop/react-lego/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/ngoctranfire/Desktop/react-lego/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Function.Module._load (/Users/ngoctranfire/Desktop/react-lego/node_modules/isomorphic-loader/lib/extend-require.js:79:29)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19) +801ms

This error appears when I try to run npm run start:dev in the svg-isomorphic-loader branch. I think this is an outdated branch, and the svg branch is probably the one we should be using. If that is correct, we can just close this issue.

peter-mouland commented 8 years ago

This branch is not complete (and is not mentioned in the readme.md).

I was playing around with isomorphic-loader in the hope i could get it to do inline-svgs, but it's not setup to do that. So far I have only found webpack-isomorphic-tools that does this.

To get it working we may need to use this plugin at the same time: https://github.com/kossnocorp/assets-webpack-plugin