I am writing this article to help people that are just starting to learn Phaser 3 and need extra support when deploying their game to production. This tutorial will focus on configuring your app with Webpack, I will run through each line of code explaining what they are doing and why they are important. This tutorial won’t show you how to set up your Phaser 3 game, in that case I recommend you to start with this template and jump to configuring your
prod.js
in this article (Step 5).
First of all, create a
webpack
folder in the root of your app. Inside this folder, create two files:base.js
andprod.js
. The former will be responsible for bundling your app both in development, the latter will be merged to the former and create your production bundle.
Before starting with the configuration files, you need to install the dependencies we will need. Below is the list of required modules used in this tutorial:
#phaser3 #webpack #javascript #babel #microverse #game-development #production #gaming