Open markjlorenz opened 2 years ago
I found a workaround using __dirname
:
import path from "path"
this.load.tilemapTiledJSON("map", path.join(__dirname, "../assets/tiles/map.json"))
Im facing the same issue but In my case is not that simple. I need to load an asset pack, but due I cannot use the setUrl or setPath is not working :S. there is any chance to have this solved? ty!
try setting this.load.setBaseUrl
instead. Here's an example that redirects it for use with unit tests
https://github.com/zewa666/phaser-vitest-bug/blob/master/src/scenes/Game.ts#L9
I'm getting the following error
My code looks like this:
The full (correct) file path for the the asset is:
I tried calling
this.load.setPath()
at the top ofPreloader.js#preload
, thinking that I might just be able to reset the relative path, but that didn't have any effect.I see the test for this behavior, but I wonder if it's passing because it also runs in the
@geckos.io
file path.I'm using Phaser 3.52.0 `