Skip to content

Comments at the end of script tags cause errors #64

@mrkishi

Description

@mrkishi

It seems the parser has problems when the last thing in a script tag is a comment, raising the following errors:

SyntaxError: Error transforming $file with 'svelte' plugin: Unterminated regular expression (9:2)

See this gist for an example. Delete the bottom comments to fix the compilation error. It doesn't work with multiline comments either!

Adding anything below the comments also fixes the problem (for instance, uncommenting the last line).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions