Remove nodejs/browser specific code in library
Yeah..

Are you against maintaining 2 repositories or maintaining 2 main files? Honestly I would have 2 main files with a third file ( or more ) containing routines that are host agnostic.

docxgen_node.coffee , docxgen_www.coffee and docxgen_common.coffee

It sounds uncool, but I think in the end, this should be easiest on the eyes.

Other, than that, I would take the opportunity to use that massive ( ugly ) string array to document why you need each library and maybe which versions are usable for your repository:

var requiredLibraries = [
  "grid.js",     //Use xyz version, uses abc features
  "version.js",  //...
  "detector.js", //..
  ...
]

requiredLibraries.forEach (file) -&gt;
    vm.runInThisContext(global.fs.readFileSync(__dirname + '/../vendor/jsqrcode/' + file), file)