
module.exports = process.browser
  
  // Browserify? Export riot.js
  ? require('../../riot')

  // Node? Export compiler.js
  : { compile: require('../../lib/compiler').compile }


// For browserify, export riot.js
var self = module.exports = require('../../riot')

// For node, export riot+compiler.js
if(!process.browser) self.compiler = require('../../riot+compiler')

--- 
+++ 
@@ -1,6 +1,8 @@
 
-// For browserify, export riot.js
-var self = module.exports = require('../../riot')
+module.exports = process.browser
+  
+  // Browserify? Export riot.js
+  ? require('../../riot')
 
-// For node, export riot+compiler.js
-if(!process.browser) self.compiler = require('../../riot+compiler')
+  // Node? Export compiler.js
+  : { compile: require('../../lib/compiler').compile }
Fix module to return a compiler in Node
