For using Phaser CE with ionic, have a look at the ionic example within project templates. To get phaser-ce working with ionic in general, you've to extend "only" the webpack config used by ionic. To get this done are a few steps are necessary.
-
Install dependencies webpack-merge and expose-loader:
npm install webpack-merge expose-loader --save-dev
-
Create a new webpack config setting up expose-loader and merging it with the ionic webpack script.
-
Add own webpack config at package.json, so that ionic will use it:
{ "config": { "ionic_webpack": "./webpack.config.js" } }
-
Import pixi, p2 and phaser-ce within your project:
import "pixi"; import "p2"; import * as Phaser from "phaser-ce";