closure-compiler icon indicating copy to clipboard operation
closure-compiler copied to clipboard

Including "rewrite_polyfills=false" in parameters to web service has no affect.

Open ScottHuston opened this issue 4 years ago • 2 comments

When I POST a request to https://closure-compiler.appspot.com/compile with "rewrite_polyfills=false" included, it appears to be ignored.

["output_format=json", "compilation_level=SIMPLE_OPTIMIZATIONS", "language=ECMASCRIPT8", "rewrite_polyfills=false", "output_info=compiled_code", "output_info=statistics", "output_info=errors", "output_info=warnings", "code_url=https://<<removed>>"]

Same behavior when I try using the web page manually and add @rewrite_polyfills false

` // ==ClosureCompiler==

// @compilation_level SIMPLE_OPTIMIZATIONS // @output_file_name default.js // @rewrite_polyfills false // @code_url https://<> // ==/ClosureCompiler== `

Tellingly, in this case, the POST DATA tab doesn't show that parameter included.

Can we get this parameter supported in the web service?

ScottHuston avatar Feb 28 '21 00:02 ScottHuston

Hi, did the server not emit an error when it failed to process your request with that parameter? As per https://developers.google.com/closure/compiler/docs/api-ref#params, we currently support a limited set of parameters in the API and if you supply other parameters, you should have seen this error.

The HTTP request contains a parameter other than one of the ones listed in this document.

rishipal avatar Mar 02 '21 23:03 rishipal

No error was reported. Processed just fine, just didn't do what I asked.

Why not support this option?

ScottHuston avatar Mar 03 '21 01:03 ScottHuston