azerion / phaser-input

Adds input boxes to Phaser like CanvasInput, but also works for WebGL and Mobile, made for Phaser only.
MIT License
201 stars 64 forks source link

Add Browserify support #55

Closed bdaenen closed 6 years ago

bdaenen commented 6 years ago

When loading this module through node or Browserify's require() a "module not found" error is thrown. This is due to the package.json file missing a "main" entry pointing to the main application script.

By adding this Node and Browserify users can easily use require('@orange-games/phaser-input'), allowing it to be nicely packaged inside their bundled script file.

Do note that using the script in this way still requires one to expose Phaser to the global scope. This is caused by the plugin relying on globals.

bdaenen commented 6 years ago

Never mind. After testing this out there is no way to properly require() it due to it not exporting anything.