Jump to content

Phaser 3 + ES6 + Webpack bootstrap project


nkholski
 Share

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

 

Link to comment
Share on other sites

  • 3 weeks later...
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.

Link to comment
Share on other sites

Hey, I made a quick game using your bootstrap:
https://github.com/Raicuparta/square-touch

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,
  b,
  c,
}

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

Unexpected token: punc (,)

 

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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...