Skip to content

Add modern exports#7243

Open
kibertoad wants to merge 1 commit intophaserjs:v4.0.0from
kibertoad:fix/exports
Open

Add modern exports#7243
kibertoad wants to merge 1 commit intophaserjs:v4.0.0from
kibertoad:fix/exports

Conversation

@kibertoad
Copy link

@kibertoad kibertoad commented Feb 8, 2026

This PR (delete as applicable)

  • Adds a new feature

Describe the changes below:

In order to use headless version of Phaser with vitest, an explicit alias is needed in the configuration:

    resolve: {
        alias: {
            // Phaser's "main" points to source that requires the devDependency
            // phaser3spectorjs. Redirect to the pre-built ESM bundle instead.
            phaser: "phaser/dist/phaser.esm.js",
        },
    },

This is unnecessary and ideally should be handled by explicitly defined export, which are added in this PR. I have validated that after this change alias is no longer necessary, vitest just works.

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