Phaser 3 + ES6 + Webpack bootstrap project

Recommended Posts


I updated the excellent Phaser + ES6 + Webpack bootstrap project (https://github.com/lean/phaser-es6-webpack) with Phaser 3. Most of my repository is an exact copy of that repository, only with the Phaser package updated to Phaser 3 and the example replaced with one based on Phaser 3. The example source code is not an example of best practices, it's basically guess work but it works and take advantage of ES6 classes.

This will do for testing out Phaser 3 but I think it would be a really great idea if Phaser 3 got an official bootstrap project when released (with ES5/ES6+/Typescript options), and that could be community driven.

Github: https://github.com/nkholski/phaser3-es6-webpack


Share this post

Link to post
Share on other sites
On 05/09/2017 at 7:47 PM, nkholski said:

There is an open issue on GitHub for that. I'll update the repository when the first Phaser 3 beta is out, and will close this issue then too. However, I'm a bit curious why someone would need deploy at this stage :-).

I was just running through the readme.md and it says you can do that, though I do realise this was cloned from the PhaserV2 version which says exactly the same.  I did fix it up myself because I wanted to compare the output and play with the uglify compress options but my fix (bodge) was for my purposes only rather than a generic one so didn't try to submit it.

Share this post

Link to post
Share on other sites

Wow. I'll take a look tonight. Actually it's not a bad idea to treat the example as a playground that can be packed with additional features one may think of. I think it could be helpful for getting a insight to Phaser 3. I'll merge the PR when I have tested it! Thanks

Share this post

Link to post
Share on other sites

Hey, I made a quick game using your bootstrap:

Or if you want to try the game (better on mobile) http://square-touch.surge.sh

I had to comment out the UglifyJS stuff from the webpack production config file, otherwise deploy would fail when it found something like this:

const b = 20
const c = 30

const values = {
  a: 10,

Fails on the comma after b inside values, with the error:

Unexpected token: punc (,)


But this bootstrap really made things a lot faster, thanks!

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.