evilfer / react-phaser

Other
101 stars 16 forks source link

Uncaught ReferenceError: Phaser is not defined physic-system-name.js?25e5:5 #6

Open kevzettler opened 7 years ago

kevzettler commented 7 years ago

This file references a global Phaser variable but doesn't import it anywhere.

https://github.com/evilfer/react-phaser/blob/master/src/impl/physic-system-name.js#L5

screenshot 2016-09-11 12 16 19

evilfer commented 7 years ago

How are you loading your JS? If you take a look at https://github.com/evilfer/react-phaser/blob/master/examples/part5/index.html you'll see that Phaser js needs to be loaded separately, it's not bundled together with your code.

kevzettler commented 7 years ago

I'm using webpack and require('react-phaser') Thanks for linking to the example. That should be up front in the README as it is not obvious.