Search code examples
game-developmentfirebase-hostingphaser-framework

How can I deploy my Phaser 3 game using firebase Hosting


I have been messing with Phaser 3 lately and would like to upload my game on a website. I know firebase offers hosting which is free so I wanted to try that out. I successfully setup everything on the firebase side using the firebase-cli. My phaser project uses a webpack config. When I test my phaser game locally using "firebase serve" it doesnt load the phaser code at all. On the other hand it works perfectly with "yarn dev". Has anyone had any experiance deploying a phaser app on firebase hosting? I did some reasearch but didnt really find out much about that topic. Any help is appreciated.

I setup firebase hosting with firebase-cli but when testing the game locally via firebase-serve the website doesnt load anything related to phaser.

EDIT: Also I get no errors whatso-ever which makes this even more confusing


Solution

  • I found a solution to my Problem. Basically, I had set up my webpack wrong. For anyone looking to get into Phaser 3 Development, I'd suggest you check out Yannick's template that works with phaser+webpack+typescript. Here is the link: https://github.com/yandeu/phaser-project-template . It also is pretty up-to-date which is awesome!