hhvm / xhp-js

Easily create JS controllers for XHP elements, and XHP wrappers for React elements
MIT License
55 stars 6 forks source link

`require` is not defined because, apparently the most recent versions of Browserify do not expose require to the global scope #1

Closed barbu110 closed 8 years ago

barbu110 commented 8 years ago

The example provided in the example repository will not work with the latest version of Browserify, because seems like Browserify does not expose the require() method the global scope.

What can be done for using the modules with the magical require()?

fredemmott commented 8 years ago

Sorry, was on leave - I'll look into how to fix this. Until then, the non-module form should still work.

fredemmott commented 8 years ago

In my testing, require() is still provided by the latest version, 13.1.0; are you using 'browserify -r YourModuleHere' ?