Unterminated template literal in template literal

At this moment I am migrating Snipcart to the latest implementation method described at Installation – Snipcart Documentation.

After copy-pasting the default initialisation HTML code snippet, I get the following error when I run hugo server -D to build my Hugo website:

unterminated template literal in template literal on line 439 and column 1507 15: ...,i.src=${window.SnipcartSettings.protocol}:`

This error prevents the build process from my Hugo website (running the latest version of Hugo). I found a workaround to prevent this error by transforming the default Snipcart HTML code snippet from ES6 to ES5 via this online tool. This works OK for the time being, but isn’t a future-proof solution.

Who can collaborate on this?