Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3661664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:19:50+00:00 2026-05-19T01:19:50+00:00

Google Closure Compiler renames all true, false and null occurences in code like; var

  • 0

Google Closure Compiler renames all “true”, “false” and “null” occurences in code like;

var s = true, x = null, V = false;

and uses these shorthands instead; in conditions such as;

if (someVariable == s)

now; Google Analytics code defines it’s own “s” variable; overriding the value “true”; and as you can see this causes a lot of problems.

I don’t want to change GA code; I just want Closure Compiler to quit renaming true etc. Externs do not work.

Do you know any way to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:19:50+00:00Added an answer on May 19, 2026 at 1:19 am

    It turns out that one can prevent Google Closure Compiler from printing out global definitions (function and/or variable) by a parameter called “output_wrapper” to the command line code such as;

    java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --output_wrapper "(function(){%output%})();" --js input.js --js_output_file output.js
    

    This way, it doesn’t collide with global variables and prints all your code in an anonymous function wrapper.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm testing google closure-compiler and wanting to compile facebox Plugin with the option Advanced
Does Jammit require YUI Compressor or the Google Closure Compiler to be installed on
Possible Duplicate: jQuery compiled with Google Closure Compiler I am using jQuery and I
Any ideas on how to use Google Closure Compiler to combine multiple JavaScript files
Google Code provides a barcode like this: When you download software. What is its
In Google Closure Compiler I get the warning WARNING - dangerous use of the
I'm using the Google Closure Compiler in advanced mode for a project I'm working
I am writing a Google Chrome extension with the help of Google closure compiler.
I am wondering that how Google's Closure Compiler works. Can I, for instance, make
Google Analytics reads like a seismic chart lately

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.