Skip to content

'SyntaxError: [vue/compiler-sfc] Unexpected token' exception when SFC content (script section) include '</script>' string #216

Open
@pal-software

Description

@pal-software

'SyntaxError: [vue/compiler-sfc] Unexpected token' exception when SFC content (script section) include '</script>' string

If script section of sfc include substring </script> then exception SyntaxError: [vue/compiler-sfc] Unexpected token generated.

To Reproduce

Source code to reproduce error:

index.html.txt

test-app.vue.txt

Expected behavior

Work without error

Versions

  • Browser (name & version): ms edge
  • vue3-sfc-loader: 0.9.5

Additional context

Temporary solution is split string to two substring ('</script>' as '</' + 'script>')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingunconfirmedUnconfirmed issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions