/phaser_3_webpack_4_typescript_3

Phaser3 Boilerplate with webpack 4 and TypeScript 3 on board

Primary LanguageJavaScriptMIT LicenseMIT

Phaser 3 Webpack 4 Typescipt 3 Boilerplate

Plain webpack 4 Boilerplate with Phaser 3 and Tyepscript 3 on board

Setup

You'll need to install a few things before you have a working copy of the project.

1. Clone this repo:

Navigate into your workspace directory.

Run:

$ git clone https://github.com/Krak86/phaser_3_webpack_4_typescript_3.git

2. Install node.js and yarn:

https://nodejs.org/en/

3. Install dependencies:

Navigate to the cloned repo's directory.

Run:

$ npm i

Development

Run the local webpack-dev-server with livereload and autocompile on http://localhost:3000/

$ npm run dev

Deployment

Build the current application

$ npm run prod

If you're not familiar with webpack, the webpack-dev-server will serve the static files in your build folder and watch your source files for changes. When changes are made the bundle will be recompiled. This modified bundle is served from memory at the relative path specified in publicPath.

Credits

Phaser 3 demo game example: http://phaser.io/tutorials/making-your-first-phaser-3-game
Phaser 3 + Typescript + Webpack https://github.com/troyedwardsjr/phaser3-typescript-webpack

Play online

https://krak86.github.io/phaser_3_webpack_4_typescript_3/