As https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/597852 demonstrates, simply using something that looks like HTML in your JS causes a JS error.
This can even happen with an inline comment such as:
// '<a>!!!</a>';
This is unexpected.
[0217d5a6ea867720268d76a6] /w/load.php?lang=en-gb&modules=ext.cx.eventlogging.campaigns%7Cext.echo.api%2Cinit%7Cext.popups%2CshortUrl%7Cext.uls.common%2Cinterface%2Cpreferences%2Cwebfonts%7Cjquery%2Coojs%2Csite%7Cjquery.client%2Ccookie%2CtextSelection%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2CjqueryMsg%2Clanguage%2Cstorage%2Cuser%2Cutil%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%2Cstartup%7Cmediawiki.page.watch.ajax%7Cskins.vector.js%7Cuser.defaults&skin=vector&version=1io71 RuntimeException from line 1337 of /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php: Error parsing file 'X.vue' in module 'mediawiki.page.ready': HTML parse errors: Unexpected end tag : a on line 2 Backtrace: #0 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderFileModule.php(345): ResourceLoaderFileModule->getPackageFiles(ResourceLoaderContext) #1 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderModule.php(693): ResourceLoaderFileModule->getScript(ResourceLoaderContext) #2 /Users/jrobson/git/core/includes/resourceloader/ResourceLoaderModule.php(661): ResourceLoaderModule->buildContent(ResourceLoaderContext) #3 /Users/jrobson/git/core/includes/resourceloader/ResourceLoader.php(1182): ResourceLoaderModule->getModuleContent(ResourceLoaderContext) #4 /Users/jrobson/git/core/includes/resourceloader/ResourceLoader.php(890): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array) #5 /Users/jrobson/git/core/load.php(46): ResourceLoader->respond(ResourceLoaderContext) #6 {main}