Closure compiler is inlining a function, but the code size is smaller if that function is not inlined (I only care about code size - this is for JS1k). Can I tell the compiler t
This is an old question, but as of v20180101, Google Closure Compiler has an annotation that prevents inlining: @noinline.
In your original example, all you'd need is to add jsdoc with this annotation in front of the function that shouldn't be inlined:
/** @noinline */
function hello(name) {
alert('Hello, ' + name);
}
hello('New user');