Is there an easy way to use advanced optimization on my Chrome extension's code?
It uses chrome API, and Advanced Optimization doesn't recongnize its keywords. Is there a file or something that externs all chrome API?
Whenever you're in need of an externs file, take a look at the contrib/externs directory of the closure-compiler repository. The externs for Chrome extensions is found at contrib/externs/chrome_extensions.js, and can be used as follows:
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/chrome_extensions.js
// ==/ClosureCompiler==
// Your code here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With