---
title: "Comment by Rob Leachman on \"How to setup a Phaser 3 project with Vite\" | Hashnode"
description: "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"
url: "https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8/comment/6404eb42024dffb6cd3786bd"
---

[Discussion](https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8)

Comment [How to setup a Phaser 3 project with Vite](https://hashnode.com/posts/how-to-setup-a-phaser-3-project-with-vite/6383feb63596649975bc58c8)

[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! 😎
