Problem/Motivation

Modern JS allows to use template literals in string contactenation, eg.:

let myPet = 'seahorse';
console.log(`My favorite animal is the ${myPet}.`);

This code would be minified to:

let myPet = 'seahorse';
console.log(`My favorite animal is the e{myPet};.`);

Which breaks the script.

Steps to reproduce

Provide a js script with template literals and minify it.

Proposed resolution

Change minifier library from patchwork/jsqueeze to MatthiasMullie\Minify

Remaining tasks

Patch provided.

CommentFileSizeAuthor
#2 change_minifier_lib-3245042.patch1.06 KBdawid_nawrot

Comments

dawid_nawrot created an issue. See original summary.

dawid_nawrot’s picture

StatusFileSize
new1.06 KB
socialnicheguru’s picture

Status: Active » Needs review
slydevil’s picture

Version: 8.x-2.2 » 3.x-dev
slydevil’s picture

Status: Needs review » Fixed
slydevil’s picture

Status: Fixed » Closed (fixed)