Jump to content

Using Phaser 3 with RequireJS


Recommended Posts

Previously I had used Phaser 2 with RequireJS by providing a path and export shim, and have found it a common practice when searching for the two libraries together. However, it does not seem to work with Phaser 3 as of right now.

Here is an example of what my RequireJS configuration looks like.

  paths: {
    phaser: './vendor/phaser.min'
  shim: {
    phaser: {
      exports: 'Phaser'

Within Google Chrome's Developer Tools' Network tab I can confirm that it is grabbing the `phaser.min.js` file, but when I require Phaser and print its value to console it is not an object but `undefined`.

Any suggestions on how I may correct this would be greatly appreciated! :)

Link to comment
Share on other sites

  • 3 months later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...