Skip to content

ESM module import compatibility #9

Open
jfeingold wants to merge 3 commits intophaserjs:mainfrom
jfeingold:main
Open

ESM module import compatibility #9
jfeingold wants to merge 3 commits intophaserjs:mainfrom
jfeingold:main

Conversation

@jfeingold
Copy link
Copy Markdown

@jfeingold jfeingold commented Apr 19, 2026

When attempting to launch the project following the documentation, "import Phaser" was not working due to ESM/CommonJS module import mismatches.

Simple update of these import statements to use "import * as Phaser" so that the code runs.


Note

Low Risk
Low risk import-only change; main risk is if some tooling relied on the default Phaser export, but usage remains unchanged via the Phaser namespace.

Overview
Fixes Phaser ESM/CommonJS interop issues by switching import Phaser from 'phaser' to import * as Phaser from 'phaser' in the React app (App.jsx), shared EventBus, and game bootstrap (main.js), keeping all existing Phaser.* usages intact.

Reviewed by Cursor Bugbot for commit 0dfb909. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant