Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Closure Compiler build CommonJS modules

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?

like image 991
theazureshadow Avatar asked Jul 10 '12 22:07

theazureshadow


1 Answers

Support has been added to Closure Compiler to make it is easier to work with Common JS and AMD/require.js modules using the following compiler flags:

  • --transform_amd_modules
  • --process_common_js_modules
  • --common_js_entry_module
  • --common_js_module_path_prefix

See Experimental support for Common JS and AMD/require.js modules in Closure Compiler

like image 200
Christopher Peisert Avatar answered Oct 15 '22 05:10

Christopher Peisert