phaser-shim-loader
Advanced tools
{ | ||
"name": "phaser-shim-loader", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A webpack loader that is meant to shim phaser so you can use it via require from npm. this resolves build errors", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,5 +6,38 @@ #Phaser-Shim-Loader | ||
## How to use: | ||
Currently compatible with phaser 2.2.x | ||
## Deprecation Notice! | ||
As of version 1.3.x, this module is no longer necessary to make phaser operate correctly with webpack! | ||
* [The quickest way to get running is to use the `slush-phaser-webpack` generator](https://www.npmjs.com/package/slush-phaser-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: | ||
```js | ||
global.PIXI = require('pixi.js'); | ||
global.p2 = require('p2'); | ||
global.Phaser = require('phaser') | ||
``` | ||
You will need to use the correct versions of both pixi and p2. At the imte of this writing, for `phaser@2.3.0` uses | ||
```js | ||
{ | ||
"phaser": "2.3.x", | ||
"pixi.js": "2.x.x" | ||
"p2": "0.6.x", | ||
} | ||
``` | ||
Also be aware that the npm module [`pixi`](https://www.npmjs.com/package/pixi) is the *wrong module*, you want [`pixi.js`](https://www.npmjs.com/package/pixi.js), the official module | ||
## 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. | ||
@@ -46,3 +79,2 @@ | ||
Note: This doesn't work with 2.3.x - yet. | ||
4955
23.57%79
68.09%