https://github.com/sebsowter/phaser-webpack
Phaser 3 Webpack 5 setup and TypeScript boilerplate. 🚀
https://github.com/sebsowter/phaser-webpack
phaser3 typescript webpack5
Last synced: 3 months ago
JSON representation
Phaser 3 Webpack 5 setup and TypeScript boilerplate. 🚀
- Host: GitHub
- URL: https://github.com/sebsowter/phaser-webpack
- Owner: sebsowter
- Created: 2019-02-12T13:36:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T06:31:42.000Z (about 1 year ago)
- Last Synced: 2025-03-26T02:42:30.940Z (3 months ago)
- Topics: phaser3, typescript, webpack5
- Language: TypeScript
- Homepage:
- Size: 2.19 MB
- Stars: 34
- Watchers: 2
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phaser 3 Webpack 5 Boilerplate
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.
Included are some handy demonstration files:
- `Inputs` class for handling gamepad and keyboard inputs
- `Player` class demonstrating character movement and state management
- A basic tilemap created using [Tiled](https://www.mapeditor.org/)[View the demo](https://sebsowter.github.io/phaser-webpack/)

## Installation
Ensure you have [Node.js](https://nodejs.org) installed.
Clone this repository and `cd` to project directory.
```
npm i
```## Tasks
### Run the development server
```
npm start
```Preview locally at http://localhost:8080/.
### Create a production build
```
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.
_If you are publishing your game to [itch.io](https://itch.io) simply zip up the files in the `/dist` folder and upload the zip file._
## Community
This repository is actively maintained. Every so often I upgrade the packages and add features. I like boilerplates to be light so I have kept it minimal. But if you think this package would benefit from additional features then feel free to reach out or add an issue.