[Tickets #15044] Horde_JavascriptMinify needs UglifyJS API v3 backend

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Nov 23 14:17:17 UTC 2020


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/15044
------------------------------------------------------------------------------
  Ticket             | 15044
  Created By         | mike.gabriel at das-netzwerkteam.de
  Summary            | Horde_JavascriptMinify needs UglifyJS API v3 backend
  Queue              | Horde Framework Packages
  Type               | Enhancement
  State              | New
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


mike.gabriel at das-netzwerkteam.de (2020-11-23 14:17) wrote:

The current UglifyJS implementation in Horde-JavascriptMinify complies  
with UglifyJS API v2.
https://github.com/mishoo/UglifyJS/tree/v2.x

However, v2 of the API is deprecated and v3 is current state of the  
art. Unfortunately, the command line handling of source maps differs  
between v2 and v3.
https://github.com/mishoo/UglifyJS

If a source map is needed when minifying with uglifyjs, than, with v3,  
one basically needs to write the minified JS into a file (--output  
<min.js>) (and not to stdout). If one adds --source-map as cmdline  
option, a <min.js>.map gets created additionally.

The --source-map-url option's value must then be passed into  
--source-map <options>. But I failed to figure out whether to use url=  
or root= here.

I tried to come up with a patch for this, but failed due to lack of  
understanding of what is needed in Horde.

Maybe dropping source map support for the UglifiyJS JavascriptMinify  
backend is an alternative option?

Greets,
Mike





More information about the bugs mailing list