Vite can't get the image from spine atlas file

As I add a spine to canvas:

this.load.spine('set', spineJsonPath, spineAtlasPath)

SpinePlugin will dynamically get the spine’s image from the atlas file content
(see the first line of an atlas file demo belows):

spineboy.png
size:2048,512
filter:Linear,Linear
pma:true
... 

After building the project by Vite, this image of spine would be missing in dist-folder cuz it’s not be imported in source code manually.

How to fix it?

See https://vitejs.dev/guide/assets.html#the-public-directory.

1 Like

Thank you so much!