kripken/emscripten — pull request #1690 by fadams (2013-10-02 19:08:53+00:00)
Title: Fix module exports with closure try2

This is my second attempt at fix-module-exports-with-closure trying to get a clean diff with respect to incoming as requested.

fixed problem where module.exports, which is needed by node.js gets incorrectly minified by Closure. Simple change from module.exports = Module to module['exports'] = Module fixes this. Added simple test case compiling with --O2 -closure 1 to /tests/Module-exports.

Hope that this is OK - I ended up starting from scratch on a new branch because I never did get figure out how to do a rebase on the other branch without getting a conflict requiring a merge of tests/runner.py I certainly didn't want to try and sort any conflicts with that file given that the patch here is so trivial.