app router port
Ports it to using app router. Can be kept in a separate branch and linked to in README.md for example.
Cannot target any other branch than main from here though.
[!NOTE] Migrates to Next.js App Router with client-only Phaser setup, adds integration docs, updates TS config, and bumps Phaser to 3.90.0.
- App Router Migration:
- Add
src/app/layout.tsx,src/app/page.tsx, andsrc/app/ClientAppWrapper.tsx(SSR disabled viadynamic(..., { ssr: false })).- Remove legacy
src/pages/*files.- Phaser Integration:
- Refine
PhaserGamelifecycle and event wiring; maintain React ↔ Phaser communication.- Add docs:
phaser-nextjs-integration.mddetailing architecture and modal usage.- Config:
- Update
tsconfig.jsonwith Next plugin and includes.- Dependencies:
- Upgrade
phaserto^3.90.0.Written by Cursor Bugbot for commit 6549a67c3367f4d980b05d305c1b439e5a38dd27. This will update automatically on new commits. Configure here.
Ports it to using app router. Can be kept in a separate branch and linked to in README.md for example.
Cannot target any other branch than main from here though.
Good luck! Just pointing out this is basically a dupe of a PR I made many months ago now: https://github.com/phaserjs/template-nextjs/pull/3
It seems these sorts of PRs are not a priority at the moment for them, they are focused on new core releases and the editor. I definitely sympathize with the PR though, maybe you will have better luck on getting a merge than I, especially since yours appears in sync w the current main. 🫡
Hi @ospira - yep saw yours afterwards. Good to have a couple of references around. At least for me - not the most straightforward thing in the world to put a phaser game in a next.js app.