Custom Cursor for Electron / non URL for setDefaultCursor

So I am developing an Electron app using Phaser 3. Instead of using URLs to import images, I tend to use import because all the assets are copied / flattened by Electron. So to load an image I do something like this:
import pointer ‘(@assets/images/pointers/pointer.png’)

And then later load the image like this:
this.scene.load.image(“pointer”, pointer);

The problem is, I can’t use a URL with Electron / setDefaultCursor. The below doesn’t work and I don’t know what to do instead:
this.input.setDefaultCursor(
‘url(assets/images/pointers/pointer.png), pointer’
)

Is there some other way of setting the cursor to an image if I can’t use a URL because of Electron?

For anyone else who has this issue, you appear to be able to use base64 encoded cursors and use them inline. This is the only way I could figure our how to do this without knowing the url due to Electron.

So something like this works:
let cursorString = ‘url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACA), pointer’;
this.input.setDefaultCursor(cursorString);