Get up and running with Phaser 3 using TypeScript or JavaScript ES6.
This Webpack setup takes care of your code bundling and local development server.
Ensure you have Node.js installed.
Clone this repository and cd
to project directory.
npm i
npm start
Preview locally at http://localhost:8080/.
npm run build
This bundles your files to the distribution (/dist
) folder. The webpack config is set up to output Phaser and your game code into separate .js files.
npm run deploy
The contents of the "dist" folder will be deployed to GitHub Pages. Please modify the URL in the "homepage" field of the package.json as needed.
package.json
{
"name": "phaser3-webpack-typescript-template",
"homepage": "https://atman-33.github.io/phaser3-webpack-typescript-template",
...