Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.5.0, 9.0.0-M2, 7.14.0
-
None
Description
The DefaultJavaScriptCompressor uses the JavaScriptStripper to strip comments and whitespace from javascript code when running in production mode, but it has no support for / understanding of template literals. As such, it chokes on the following snippet
const url = `${protocol}//${hostname}:${port}`;
as it identifies the two forward slashes as the beginning of a single-line comment, and removes the code after it, breaking the javascript.