forked from tapio/live-server
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Console text: Uncaught SyntaxError: Invalid or unexpected token
Using alive-server 1.3.0 with Chrome 134.0.6998.166 on macOS 12.7.6, I build my app two ways:
-
dev: vendor/libraries are in a file
libraries.jsand loaded via<script src="./libraries.js"></script>. This works just fine in alive-server. -
prod: contents of
libraries.jsare embedded into index.html in a<script>block. This causes the SyntaxError in Chrome.
Here is a section of the code containing the error:
else if (key === 'innerHTML' &&
isSVG(elm.tagName) &&
isUndef(elm.innerHTML)) {
// IE doesn't support innerHTML for SVG elements
svgContainer = svgContainer || document.createElement('div');
svgContainer.innerHTML = "<svg>".concat(cur, "<!-- Code injected by live-server -->
<script type="text/javascript">
// <![CDATA[ <-- For SVG support
if ('WebSocket' in window) {
(function() {
function refreshCSS() {The error is occurring at "<!-- Code injected by live-server -->. Please let me know if you need more information to help narrow down the bug.
Metadata
Metadata
Assignees
Labels
No labels