ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

"TypeError: undefined is not a function" with transform reactify and expose #76

Closed benoitguigal closed 9 years ago

benoitguigal commented 9 years ago

''' var browserify = require('browserify-middleware'); var reactify = require('reactify'); browserify.settings('transform', ['reactify']);

router.get('bundles/my_component.js', browserify([{'path-to-my-component': {expose: 'MyComponent'}}]) '''

yield the following error:

''' ./node_modules/browserify-middleware/node_modules/browserify/node_modules/browser-resolve/node_modules/resolve/lib/async.js:29 if (x.match(/^(?:..?\/|\/|([A-Za-z]:)?)/)) { ^ TypeError: undefined is not a function '''

Note that there are no error when I don't specify an expose option. ''' router.get('bundles/my_component.js', browserify (['path-to-my-component'])) '''

benoitguigal commented 9 years ago

My bad I was using a previous version