How to use Phaser in Electron and React in 2024

I think I fixed it!

Step 1 was to add blob: to the Content-Security-policy in index.html as such:

<meta
      http-equiv="Content-Security-Policy"
      content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:"
    />

Step 2 was to remove this line from the (phaser) Preloader.ts script so the path doesn´t get mixed up:

this.load.setPath('assets');

And Voilà! Everything works as expected.