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 | 11/23/2020 (1633 days ago) |
Due | |
Updated | 11/23/2020 (1633 days ago) |
Assigned | |
Resolved | |
Milestone | |
Patch | No |
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Horde_JavascriptMinify needs UglifyJS API v3 backend
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
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