phaserjs/template-vite-ts

Failure to load texture atlas in load.multiatlas()

kmizuki opened this issue · 1 comments

Hi,
I attempted to load using load.multiatlas() and tried to load with texturepacker,
but a prefix that I do not remember setting, "MA0_", is added to the image path, causing the image load to fail.
It seems that loading works fine when not using vite. Please provide a solution.

code:

this.load.multiatlas("sprites", "spritesheets/sprites.json");

error:

main.ts:30 Failed to process file: image "MA0_sprites-0.png"
main.ts:30 File failed: multiatlas "sprites" (via image "MA0_sprites-0.png")
main.ts:30 Failed to process file: image "MA0_sprites-1.png"
main.ts:30 File failed: multiatlas "sprites" (via image "MA0_sprites-1.png")

It seemed to be caused by load.setPath(). I will close this for now.