Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Using Phaser 3 with RequireJS


nox020189
 Share

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.

requirejs.config({
  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...
 Share

  • Recently Browsing   0 members

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