我想使用 Google Closure Compiler构建一组CommonJS模块。这可以开箱即用吗?或者,是否可以对 CommonJS 模块进行一些简单的转换,以允许 Closure Compiler 使用它们?
最佳答案
已向 Closure Compiler 添加支持,使其更易于使用 Common JS和 AMD/require.js使用以下编译器标志的模块:
--transform_amd_modules
--process_common_js_modules
--common_js_entry_module
--common_js_module_path_prefix
参见 Experimental support for Common JS and AMD/require.js modules in Closure Compiler
关于javascript - Closure Compiler 可以构建 CommonJS 模块吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11422821/