---
title: "Discussion on \"How to setup a Phaser 3 project with Vite\" | Hashnode"
description: "Discussion on \"How to setup a Phaser 3 project with Vite\". (Note, this article has been reposted from my old blog)\nHey there 👋\nThis 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..."
url: "https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to setup a Phaser 3 project with Vite](https://saricden.com/how-to-setup-a-phaser-3-project-with-vite?utm_source=hashnode&utm_medium=feed)

(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...

Nov 28, 2022 · 3 min read · saricden.com  
Updated Dec 14, 2022  
Read the article

-   [#vite](https://hashnode.com/tag/vite)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#game-development](https://hashnode.com/tag/game-development)
-   [#phaser](https://hashnode.com/tag/phaser)

## Written by

[Kirk Morris](https://hashnode.com/@saricden)

@saricden

  
[View profile](https://hashnode.com/@saricden)

Indie game dev who (b||v)logs about it.

## Responses 2

Markdown supported · ⌘↵ to post

[Rob Leachman](https://hashnode.com/@Quazar)

[Mar 5, 2023](https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8/comment/6404eb42024dffb6cd3786bd)

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 build` and 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.ts` to 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

[Kirk Morris](https://hashnode.com/@saricden)

[Mar 5, 2023](https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8/comment/6404eb42024dffb6cd3786bd#reply-6404edd087595bb6fc885a70)

Hey Rob! Thank you for the great feedback!! When I get a chance I'll definitely update the tutorial to include more on static asset loading! 😎

[Rob Leachman](https://hashnode.com/@Quazar)

[Mar 5, 2023](https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8/comment/6404d49187595bb6fc8856ad)

I'm excited to move over to Vite :) thanks for this!
