django pipeline -- how to pass uglifyjs pure_funcs via command line?

290 Views Asked by At

I am trying to remove a list of functions using pure_funcs in uglifyjs 2.4.13.

When my settings are as follows:

PIPELINE_UGLIFYJS_ARGUMENTS = "-c pure_funcs=['App.LOG.info']"

I get the following error:

return ([App.LOG.info])
         ^
ReferenceError: App is not defined
1

There are 1 best solutions below

0
On

Turns out I just needed to add some back slashes so the quote wasn't parsed out:

PIPELINE_UGLIFYJS_ARGUMENTS = "-c pure_funcs=[\\\'App.LOG.info\\\']"