I would like to use Google Closure Compiler to build a set of CommonJS modules. Can this be done out of the box? Alternatively, is there some simple transformation that can be done to the CommonJS modules to allow them to be consumed by Closure Compiler?
I would like to use Google Closure Compiler to build a set of CommonJS modules. Can this be done out of the box? Alternatively, is there some simple transformation that can be done to the CommonJS modules to allow them to be consumed by Closure Compiler?
Share Improve this question asked Jul 10, 2012 at 22:13 theazureshadowtheazureshadow 10.1k6 gold badges35 silver badges49 bronze badges1 Answer
Reset to default 6Support has been added to Closure Compiler to make it is easier to work with Common JS and AMD/require.js modules using the following piler flags:
--transform_amd_modules
--process_mon_js_modules
--mon_js_entry_module
--mon_js_module_path_prefix
See Experimental support for Common JS and AMD/require.js modules in Closure Compiler