6.0.0-git
2021-04-10

[#15044] Horde_JavascriptMinify needs UglifyJS API v3 backend
Summary Horde_JavascriptMinify needs UglifyJS API v3 backend
Queue Horde Framework Packages
Type Enhancement
State New
Priority 1. Low
Owners
Requester mike.gabriel (at) das-netzwerkteam (dot) de
Created 2020-11-23 (138 days ago)
Due
Updated 2020-11-23 (138 days ago)
Assigned
Resolved
Milestone
Patch No

History
2020-11-23 14:17:17 mike (dot) gabriel (at) das-netzwerkteam (dot) de Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Horde_JavascriptMinify needs UglifyJS API v3 backend
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
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

Saved Queries