SAP Knowledge Base Article - Preview

3724550 - Enabling ES6+ JavaScript Minification in WRO4J for accelerator storefront service

Symptom

When building or loading the storefront JavaScript bundles (for example all_responsive.js), the following issues may occur:

  • JavaScript minification fails during the WRO4J processing stage.

  • Browser console errors appear when ES6+ syntax is present in JavaScript files.

  • Errors may be similar to:

SyntaxError: Unexpected token

or

WroRuntimeException during JSMin processing

or

JSMin$UnterminatedStringLiteralException

This behavior occurs when JavaScript files contain ES6+ syntax, such as:

// Smart quotes (“ ” ‘ ’) instead of ' "

var html = `

  <div>
    <span>Test</span>
  </div>

`;


Read more...

Keywords

KBA , CEC-SCC-COM-BCA-COR , Core Accelerator , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.