How to get jQuery to work with google close compiler

I look through all the messages related to GCC, with jQuery, but cannot find a solution. Is jQuery not yet compatible with GCC? If you can not refer to the appropriate link or provide an example?

+6
source share
2 answers

The main jQuery distribution is incompatible with the Closure ADVANCED_OPTIMIZATIONS compiler. To use the main jQuery assembly, you must reference the corresponding extern jQuery file in the Closure-compiler folder.

I have an experimental jQuery 1.9.1 build compatible with ADAVANCED_OPTIMIZATIONS. This is available on my github account .

A compatible version of jQuery 2.0.x is under development but not yet complete.

+8
source

Try adding this flag:

- process_jquery_primitives

https://code.google.com/p/closure-compiler/wiki/jQueryExpansions

+1
source

Source: https://habr.com/ru/post/944625/


All Articles