Skip to content

idpokute/Phaser3-React-Vite-Template

Repository files navigation

Phaser 3 + Vite + Create React App template

I converted Phase3+CRA template to support Vite. FYI. Vite is faster than webpack bundler. I hope you will save development time.

What's included?

  • Phaser 3 - overlaid canvas with the config in src/PhaserGame.ts and a scene in src/scenes/
  • Create React App - React, TSX, ES6, TypeScript, Webpack, and etc, but this template will replace Webpack with Vite.
  • Vite - Faster bundler than Webpack which is default bundler of Create React App
  • An example button in src/App.tsx showing how to communicate with Phaser within a React component
  • That's it!

Getting started

Clone the project and in the project directory, you can run:

yarn install or npm install

Install required packages to run the app.

yarn start or npm run start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

yarn build or npm run build

Builds the app for production to the build folder.

About

Phaser3 with React Template using Vite bundler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published