williamist
unread,Nov 6, 2024, 12:38:08 PM11/6/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Closure Compiler Discuss
Hello. I've been liking using Closure Compiler so far, but I've run into a bit of an interesting occurrence where certain property names just don't get renamed, even if they are only referenced with dot notation.
Here's an example: (I'm using the property names "title" and "hint" here since those are the ones my actual code uses, there may be more, I'm not sure)
var test_object = {
not_title: "hello, this is my not title!",
title: "hello, this is my title!",
not_hint: "hello, this is my not hint!",
hint: "hello, this is my hint!"
};
console.log(test_object);
It minifies into the following output (on ADVANCED mode):
'use strict';console.log({h:"hello, this is my not title!",title:"hello, this is my title!",g:"hello, this is my not hint!",hint:"hello, this is my hint!"});
As you can see, the properties named "title" and "hint" are not renamed, even though they should be (and the ones named "not_title" and "not_hint" are).
If anyone has any insight as to why this happens, and how I can get these properties to be renamed, that would be very helpful.
Thanks.