(Note, this article has been reposted from my old blog) Hey there π This tutorial is going to delve into setting up a PhaserJS project using Vite as the build tool. Vite is a great alternative to Webpack, offering features such as instant server sta...

Markdown supported Β· ββ΅ to post
Rob Leachman
Boy howdy did I struggle to get assets to load. I think this page would be stronger if you included some words on how to do it, cover
npm run buildand include a .png or something in the demo code.Quite a wild ride but I got it. I think the key mojo is 1) put static assets in public and not under the src path, and 2) include
vite.config.tsto set the path.There is probably more, just now I am exhausted after getting unstuck. Thanks!
ref: github.com/iwantantra/vite-phaser-ts/issues/1