Skip to content

error: "Missing semicolon" when using vue v-on object syntax #6674

@varmiral

Description

@varmiral

Vue version

3.2.39

Link to minimal reproduction

https://sfc.vuejs.org/#__DEV__eNp9kcFOwzAMhl/FyqVMWpN7KZPgBE/AJZeuy0an1I6cdBymvjv2xsTGELfYzv/l95+jeU7JHqZgGtPmnodUIIcyJYgd7p68KdmblcdhTMQFXkOM9E4cN7BlGqGy7qelmOrRI4DH7YR9GQiB8A3TVB4WcNRJT5gpBhtp91ANOqkWIpk93mhe4sR/StYyuChadzYs9qQoYUyxK0EqgPaE1hPAoSaURY5w6jUXR0tQlpb6GMze6HVRt+4KZZbmvHo9dsnuM6EEdbLlvweST3M2qj2JQGtvPkpJuXEub3vNZZ8t8c7JyfKEZRiDDXms10yfObCAvVleMZw0D4FrDrgJHPg/5q+rd1zFSlqzrHL7V/rlt6mlVdd1rUt3KcxfrNi/0Q==

Steps to reproduce

Follow the link, slightly change js code to trigger demo recompilation. You will see SyntaxError: Missing semicolon.

What is expected?

Success vue file compilation.

What is actually happening?

SyntaxError: Missing semicolon. (1:27)
at Parser._raise (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:1347:17)
at Parser.raiseWithData (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:1340:17)
at Parser.raise (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:1301:17)
at Parser.semicolon (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:4356:10)
at Parser.parseExpressionStatement (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:14705:10)
at Parser.parseExpressionStatement (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:10434:26)
at Parser.parseStatementContent (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:14296:19)
at Parser.parseStatementContent (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:10334:18)
at Parser.parseStatement (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:14158:17)
at Parser.parseLabeledStatement (https://unpkg.com/@vue/[email protected]/dist/compiler-sfc.esm-browser.js:14697:22)

System Info

No response

Any additional comments?

The error doesn't appear if comment out import declaration line or delete one property from binden (v-on) object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions