Page MenuHomePhorge

Celerity: javascript minification issue with template literals (backticked strings)
Open, Needs TriagePublic

Description

When a javascript file is loaded in a Phabricator application, the CelerityResourceTransformer will minify the javascript code.
When you have a template literal in javascript, the jsShrink minifier will also remove the spaces from this literal.

For example:

let someVariable = `some text`;

becomes this after minification:

let
someVariable=`some
text`;

The content of this someVariable is not the same anymore as before the minification.

There is also another strange thing: there are 2 different types of minifications.
jsShrink is builtin in Phabricator, but there is also jsxmin.
If jsxmin is not installed then jsShrink will be used instead.
If I google on jsxmin, I can't find anything.
Does this still exist?
Is it wise to have 2 different minification engines ?