This sample project template combines Phaser, ESBuild and TypeScript to get you started quickly

Posted on 1st Feb 2024. Follow @phaser_ and get the Phaser World newsletter.

image

The official Phaser + TypeScript + ESBuild Template is now available. This template combines Phaser 3, a popular HTML5 game framework, with ESBuild, one of the fastest and most flexibile application bundlers available and TypeScript 5, a superset of JavaScript that adds static typing to the language.

Updated to work with Phaser 3.70.0 and ESBuild 0.19+, the template simplifies the development process, supporting features like instant-rebuilding, allows triggers an automatic rebuild of the app from simply refreshing the browser.

Getting started is straightforward. With Node.js installed, developers can use commands like npm run dev to launch a development server. The server runs locally, providing a simple and efficient development environment.

The template isn't just for development; it's also geared towards making the build process easier. The npm run build command helps create production-ready builds, streamlining the transition from development to deployment.

For game developers looking for a more efficient way to work, the Phaser + TypeScript + ESBuild Template offers a practical solution. It's a useful tool for both experienced developers and those new to game development, making the process more manageable and less time-consuming.

Download the Template