closure-compiler
closure-compiler copied to clipboard
Some compilation flags are unclear
Some compilation flags are unclear, hard to understand or find out what they do or insufficiently documented. Specifically, I am talking about the wiki section on compiler flags.
Let's have a look at some of those flags:
-
compilation_level- what does--compilation_level=BUNDLEdo? Compilation level is described here in the Google doc but there is no mention ofBUNDLE. Plus it would be great if each option was described in a bit more detail, or at least via a link. -
env- what is--env=CUSTOMand how to use it? -
externs- shouldn't this be deprecated as explained here in the Google doc? -
warning_level- the default warning level value isDEFAULT... what does that mean? -
process_common_js_modules- this should probably betrueby default (as mentioned here), or in case it is experimental, it should be marked as experimental -
module_resolution- what is--module_resolution=BROWSER_WITH_TRANSFORMED_PREFIXES, what is--module_resolution=WEBPACK? These options should be described in a bit more detail, or via a link. What is the difference betweenWEBPACKandNODE? It should also be noted that in order to import fromnode_modules,--module_resolution=NODEmust be used, nothing else seems to work for that. -
force_inject_library- what isbaseandes6_runtime? I thoughtbasewas Google Closure base.js but it does not seem so. -
source_map_input,source_map_location_mapping- what is the difference between them? Maybe give an example. -
third_party- it is described as "Check source validity but do not enforce Closure style rules and conventions" ... what are the Closure style rules? Where can I find documentation on that? -
js- it should be mentioned that these are Javascript input files to be bundled. It should also mention that in order to use libraries fromnode_modules, the JS files andpackage.jsonfromnode_modulesmust be listed here as well. On top of that, externs files, which are not really source files but rather API/structure definitions, should be listed here as well.
Compiler Version: v20230103