Skip to content

Instantly share code, notes, and snippets.

@rhalff
Created September 9, 2016 13:23
Show Gist options
  • Select an option

  • Save rhalff/663358b845b46e6153b4aadf0ecc0d14 to your computer and use it in GitHub Desktop.

Select an option

Save rhalff/663358b845b46e6153b4aadf0ecc0d14 to your computer and use it in GitHub Desktop.
var compile = browserify();
compile.require('chix-flow', {
//basedir: '',
expose: 'chix-flow'
});
// hacking tha systems, externalized hack:
// https://gist.github.com/rhalff/11017968#file-gistfile1-js-L6
var stream = through();
stream.push(body);
stream.push(null);
stream.path = moduleName;
compile.exports[moduleName] = compile._hash(moduleName);
compile._expose[moduleName] = moduleName;
compile._mapped[moduleName] = moduleName;
compile.require(stream, {
entry: this.target.entry
}).bundle(function(err, src) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment