A webpack loader, that allows you to use the npm version of phaser with a normal build process.
As of phaser version 2.3.x, this module is no longer necessary to make phaser operate correctly with webpack!
You can also include the correct build criteria yourself:
This can be achieved by simply including the dependencies that are necessary for Phaser to work:
globalPIXI = ;globalp2 = ;globalPhaser =
You will need to use the correct versions of both pixi and p2. At the imte of this writing, for
"phaser": "2.3.x""pixi.js": "2.x.x""p2": "0.6.x"
How to use with old version of phaser:
Compatible with phaser 2.2.x
Like any loader, you use it in your webpack.config file.
var path = ;var phaserWebpackLoader = pathphaserWebpackDebugLoader = path//...module:loaders:test: /phaser\.js$/iloader: 'phaser-webpack-loader'test: /phaser-debug\.js$/iloader: 'phaser-debug-webpack-loader'test: /\.frag$/iloader: 'gl-fragment-loader'resolveLoader:alias:'phaser-webpack-loader': phaserWebpackLoader'phaser-debug-webpack-loader': phaserWebpackDebugLoader'gl-fragment-loader': glFragmentLoader