Can't change cursor's image

Hi, I want to change my default cursor to my own by:

this.input.setDefaultCursor(‘url(assets/cursors/pointer.png), pointer’)

I’m using webpack dev-server and I cant’ access to my image. “import” option is not working in this case, so how can I get path to my cursor image? It’s problem with webpack?

Well I believe phaser 3.x is javascript not typescript, so you’d have to use require instead of import.

I can see in devtools that image is loading as blob when i’m using “require”, but image isn’t showing in my game :confused:

Problem solved. You must add “auto” to the string, ex.:

this.input.setDefaultCursor(
“url(” + require(“…/public/assets/images/cursor.png”) + “), auto”
);