Skip to content

Instantly share code, notes, and snippets.

@abhidilliwal
Last active December 24, 2017 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhidilliwal/97ed10427d811542132283c1a1e8790f to your computer and use it in GitHub Desktop.
Save abhidilliwal/97ed10427d811542132283c1a1e8790f to your computer and use it in GitHub Desktop.

Google closure compiler: Learnings from it.

Pros

  • Produces optimized results
  • Should be well tested as used by Google
  • Supports Splits.

Cons

  • Very obscure documentation, very few resources
  • Build system doesn't understand NPM module system completely, it does add support but you need to provide all the files which are needed to build the resource:

example: java -jar compiler.jar --dependency_mode=STRICT --entry_point=js/index.js --module_resolution=NODE --js_output_file=js/dist.js --js=js/**.js --js=node_modules/jquery/dist/jquery.js --js=node_modules/jquery/package.json --js=package.json

  • Does not support CSS build or any other asset build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment